[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: |
| 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 |
| Comment by A. Jesse Jiryu Davis [ 29/Apr/20 ] |
|
Ensure readConcern counters in serverStatus are updated to include "distinct" calls, follow up to |