[SERVER-31134] Adapt change stream tests to relax assertions on change visibility Created: 18/Sep/17 Updated: 30/Oct/23 Resolved: 04/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Judah Schvimer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Repl 2017-10-02, Repl 2017-10-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Many of the tests in the change stream suite do something like this:
To add some commentary, the problematic pattern is:
These tests are okay to run against a replica set or an unsharded collection through mongos, but do not work against a sharded collection. A change stream running against a sharded collection cannot always see changes in the next batch, because it needs to return changes in order of their cluster time, and so can't immediately return results from one shard without getting a guarantee from another shard that it won't return things ahead of that one. In case that was confusing - here's an example: So, in order to re-use the tests in the jstests/change_streams directory, we need to convert assertions like the one above into a style more like:
When we eventually enable a passthrough that runs with sharded collections, we will need to be sure the periodic noop write is happening (it's disabled by default in ShardingTest, I'm not sure about through resmoke.py) - and should consider making the frequency configurable, rather than the default 10 seconds. |
||||||||||||||||||||||||||||
| Comments |
| Comment by Githook User [ 04/Oct/17 ] |
|
Author: {'email': 'judah@mongodb.com', 'name': 'Judah Schvimer', 'username': 'judahschvimer'}Message: |
| Comment by Matthew Russotto [ 19/Sep/17 ] |
|
Don't need to worry about this one: report_latest_observed_oplog_timestamp.js It is not run on sharding because it's testing a detail of mongos/mongod communication. |
| Comment by Charlie Swanson [ 18/Sep/17 ] |
|
cc spencer, I think we said judah.schvimer might have time for this? |