[SERVER-47688] "distinct" supports snapshot reads on secondaries (mongod) Created: 21/Apr/20  Updated: 29/Oct/23  Resolved: 30/Apr/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-05-04
Participants:

 Comments   
Comment by Lingzhi Deng [ 01/May/20 ]

I think it is because "distinct" already "allows" snapshot readConcern. And my patch made "distinct" return true for shouldAffectReadConcernCounter so it is counted toward the metrics. And I think it just works for non-sharded collections for both transactions and non-transactions as long as we set the timestamp readSource correctly.

Comment by A. Jesse Jiryu Davis [ 01/May/20 ]

lingzhi.deng did you figure out why "distinct" seems to update serverStatus metrics without making any code changes to implement that behavior?

Comment by Githook User [ 30/Apr/20 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-47688 Enable snapshot "distinct" command
Branch: master
https://github.com/mongodb/mongo/commit/3684f6c9461b89d9ff63a163b32b6e317fb80dd1

Comment by Lingzhi Deng [ 29/Apr/20 ]

Hmm, in my currently open CR, I have a test for "distinct" and it seems to work. And "distinct" already allows snapshot. So I think we may already have test coverages for this in SERVER-47577. And I am wondering why it works.

Comment by A. Jesse Jiryu Davis [ 29/Apr/20 ]

Ensure readConcern counters in serverStatus are updated to include "distinct" calls, follow up to SERVER-47577

Generated at Thu Feb 08 05:14:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.