Skip to content

DRIVERS-3482 Remove stale secondaryOk=true requirement from getMore section#1940

Open
GromNaN wants to merge 1 commit into
mongodb:masterfrom
GromNaN:fix/find-getmore-secondaryok
Open

DRIVERS-3482 Remove stale secondaryOk=true requirement from getMore section#1940
GromNaN wants to merge 1 commit into
mongodb:masterfrom
GromNaN:fix/find-getmore-secondaryok

Conversation

@GromNaN
Copy link
Copy Markdown
Member

@GromNaN GromNaN commented May 13, 2026

Jira: https://jira.mongodb.org/browse/DRIVERS-3482

The getMore section contained this sentence:

The query flags passed to OP_QUERY for a getMore command MUST be secondaryOk=true when sent to a secondary.

This directly contradicted the "Interactions with OP_QUERY" section of the same spec:

The secondaryOk flag SHOULD not be set for all follow-up getMore and killCursors commands. The cursor on the server keeps the original secondaryOk value first set on the find command.

The two changelog entries tell the history:

  • 2015-09-30: "Legacy secondaryOk flag must be set to true on getMore and killCursors commands"
  • 2015-10-13: "Legacy secondaryOk flag SHOULD not be set on getMore and killCursors commands" ← reversal

Commit 1aabad4 (2015-10-17) applied the reversal by updating the spec body and the changelog, but missed the sentence in the getMore section. That sentence has been inconsistent with the rest of the spec for ten years.

No behaviour change intended — the SHOULD NOT rule in the "Interactions with OP_QUERY" section has been the stated intent since 2015-10-13.

@GromNaN GromNaN requested a review from a team as a code owner May 13, 2026 15:01
@GromNaN GromNaN requested review from mana2-bot and removed request for a team May 13, 2026 15:01
@GromNaN GromNaN force-pushed the fix/find-getmore-secondaryok branch from 8969932 to 07f29c2 Compare May 13, 2026 15:11
The getMore section stated "The query flags passed to OP_QUERY for a
getMore command MUST be secondaryOk=true when sent to a secondary."

This contradicted the "Interactions with OP_QUERY" section which stated
"secondaryOk SHOULD not be set for follow-up getMore and killCursors
commands."

Commit 1aabad4 (2015-10-17) reversed the original 2015-09-30 decision
and updated the spec body and changelog accordingly, but missed this
sentence in the getMore section. Remove it to align with the SHOULD NOT
rule that has been in effect since 2015-10-13.
@GromNaN GromNaN force-pushed the fix/find-getmore-secondaryok branch from 07f29c2 to e47fc42 Compare May 13, 2026 15:12
@GromNaN GromNaN changed the title Remove stale secondaryOk=true requirement from getMore section DRIVERS-3482 Remove stale secondaryOk=true requirement from getMore section May 18, 2026
@GromNaN GromNaN enabled auto-merge (squash) May 20, 2026 14:30
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