[SERVER-30384] Query tests should not expect a particular sort order without requesting one explicitly Created: 27/Jul/17 Updated: 30/Oct/23 Resolved: 28/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc7, 3.7.1 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Kyle Suarez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Completed: | |||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||
| Sprint: | Query 2017-12-04 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Some tests are non deterministic when used with readPreference secondary with causally_consistent_jscore_passthrough suite. DDL |
| Comments |
| Comment by Githook User [ 29/Nov/17 ] |
|
Author: {'name': 'Kyle Suarez', 'username': 'ksuarz', 'email': 'kyle.suarez@mongodb.com'}Message: Refactors more tests that should be allowed to run in the causally (cherry picked from commit 92d366961e353f2552069091a3ae686db4e6c8eb) |
| Comment by Githook User [ 29/Nov/17 ] |
|
Author: {'name': 'Kyle Suarez', 'username': 'ksuarz', 'email': 'kyle.suarez@mongodb.com'}Message: This refactors several tests in core to not rely on an implicit sort (cherry picked from commit 969ddd3d921cd8e6c5ab3068fdb77cb2dc271ed5) |
| Comment by Githook User [ 28/Nov/17 ] |
|
Author: {'name': 'Kyle Suarez', 'username': 'ksuarz', 'email': 'kyle.suarez@mongodb.com'}Message: Refactors more tests that should be allowed to run in the causally |
| Comment by Githook User [ 22/Nov/17 ] |
|
Author: {'name': 'Kyle Suarez', 'username': 'ksuarz', 'email': 'kyle.suarez@mongodb.com'}Message: This refactors several tests in core to not rely on an implicit sort |
| Comment by Kyle Suarez [ 16/Nov/17 ] |
|
find1.js and snapshot_queries.js both use the deprecated cursor $snapshot option, which is incompatible with a sort order. I propose we simply keep these tests around and continue to blacklist them from the causally_consistent_jscore_passthrough suite. I assume that they'll be deleted when $snapshot is removed completely. misha.tyulenev, does that approach sound okay? |
| Comment by David Storch [ 12/Sep/17 ] |
|
There are a number of tests which expect query results to be ordered. These tests happen to work when the reads are issued against the primary, because the storage engine happens to return documents in the order in which they were inserted. They fail, however, in our causally consistent passthrough configurations. This is because the implementation details of how the data is synced to the secondary can cause the results to be returned in a different order when the read targets the secondary. This is a perfect example of why applications and tests should never expect a particular ordering of query results without asking for one explicitly. |
| Comment by Ian Whalen (Inactive) [ 12/Sep/17 ] |
|
Dave to talk with Misha about this along with a few of the other tickets representing fallout from causal consistency. |
| Comment by Misha Tyulenev [ 22/Aug/17 ] |
|
Once/if tests are updated they can be unblocked in causally_consistent_jscore_passthrough, causally_consistent_jscore_passthrough_auth, and sharded_causally_consistent_jscore_passthrough. |
| Comment by Misha Tyulenev [ 22/Aug/17 ] |
|
Passing to the query team as its mostly query related test cases. |