-
Notifications
You must be signed in to change notification settings - Fork 14
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
DOCSP-39705: Cursors #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few small things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but added @rozza for a quick look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursors as a concept aren't massively relevant to Reactive Streams. They are an implementation detail of the underlying driver and reactive streams has their own language and ways to deal with memory usage (via Subscription requests for data).
So this makes this page not quite the same as a synchronous driver. That said the example of tailable cursors is good and should be explained.
I think the best course of action is to describe that read publishers are backed by cursors from the server. Managing the data requested from these underlying custsos is done automatically via Subscription.request
. Note FindPublisher.batchSize
can be used to set the size of the batch of data each underlying cursor contains.
source/read/cursors.txt
Outdated
|
||
If the number and size of documents returned by your query exceeds available | ||
application memory, your program will crash. If you expect a large result | ||
set, :ref:`access your cursor iteratively <kotlin-sync-cursors-iterate>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: links to kotli-sync-cursors-iterate
✅ Deploy Preview for docs-java-rs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit - then LGTM
source/read/cursors.txt
Outdated
batches. Because a cursor holds only a subset of documents at any given time, | ||
cursors reduce both memory consumption and network bandwidth usage. | ||
|
||
Whenever the {+driver-short+} performs a read operation that returns multiple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this paragraph is now redundant.
source/read/cursors.txt
Outdated
Whenever the {+driver-short+} performs a read operation that returns multiple | ||
documents, it automatically returns those documents in a cursor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever the {+driver-short+} performs a read operation that returns multiple | |
documents, it automatically returns those documents in a cursor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Mostly adapted from Pymongo Cursors. Consulted with @rozza and cut out a few sections that don't make sense to include for the RS driver.
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-39705
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/java-rs/DOCSP-39705-cursors/read/cursors/
Self-Review Checklist