You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current change event loop probably leads to many cursor objects being created and left for GC - this can lead to performance issues (it's not a memory leak per se, but it generates unwanted objects).
Example:
after few minues number of MongoChangeStreamCursorImpl objects is 1274 (this should be equal to number of partitions)
Current loop scheme (MongoChangeStreamWorker.run):
do {
try (varcursor = changeStream.cursor()) { // constant re-creation of cursorChangeStreamDocument<Document> document = cursor.tryNext();
if (document != null) {
//... section A
}
} while (true);
This code in "section A" handles just one document and then worker re-creates the cursor.
Cursor re-creation may be required but should be limited by some integer counter or time limit (e.g. re-create after nnulls returned by tryNext calls or after m milliseconds whatever goes first.
The text was updated successfully, but these errors were encountered:
Current change event loop probably leads to many cursor objects being created and left for GC - this can lead to performance issues (it's not a memory leak per se, but it generates unwanted objects).
Example:
Current loop scheme (MongoChangeStreamWorker.run):
This code in "section A" handles just one document and then worker re-creates the cursor.
Cursor re-creation may be required but should be limited by some integer counter or time limit (e.g. re-create after n
nulls
returned bytryNext
calls or after m milliseconds whatever goes first.The text was updated successfully, but these errors were encountered: