Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #409: Prevent loading all archived messages in memory when indexing #410

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Dec 10, 2024

When iterating over all rows of a potentially large table, ensure that the database result set is configured to be 'linear' (forward-only and read-only).

This gives a better chance of the database driver to release all rows that have been iterated over, which prevents the fetch buffer to eventually include all rows (and potentially cause out-of-memory issues).

@guusdk
Copy link
Member Author

guusdk commented Dec 10, 2024

I've not tested this change yet.

…mory when indexing

When iterating over all rows of a potentially large table, ensure that the database result set is configured to be 'linear' (forward-only and read-only).

This gives a better chance of the database driver to release all rows that have been iterated over, which prevents the fetch buffer to eventually include all rows (and potentially cause out-of-memory issues).
@guusdk guusdk force-pushed the 409_OOM-Lucene-index-building branch from e17960b to 5e6f5c0 Compare January 7, 2025 13:23
@guusdk guusdk merged commit 0b3169b into igniterealtime:main Jan 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant