[SERVER-34242] Enable causal consistency in concurrency_replication suite Created: 30/Mar/18  Updated: 20/Jun/18  Resolved: 09/Jun/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Max Hirschhorn
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-32883 Enhanced FSM testing for reading from... Closed
Related
is related to SERVER-34209 multi_statement_transaction_simple mu... Closed
Participants:
Story Points: 5

 Description   

Either enable causal consistency in concurrency_replication, or create a separate suite with causal consistency enabled.

Causal consistency would allow us to run multi_statement_transaction_simple.js with varying writeConcerns, since we could use causal consistency to ensure that the worker threads read the writes performed during setup.



 Comments   
Comment by Tess Avitabile (Inactive) [ 29/May/18 ]

That suite sounds like great coverage.

I think it's fine to close this ticket. I originally filed it so that we could runĀ multi_statement_transaction_simple.js with varying writeConcerns for the setup, since we could use causal consistency to get read-your-writes. This is no longer important since we now get read-your-writes behavior from speculative snapshot read concern, so we could feel free to change the writeConcern used for the setup. Also we are going to get coverage for running transactions in causally consistent session inĀ SERVER-34348.

Comment by Max Hirschhorn [ 25/May/18 ]

tess.avitabile, william.schultz, how do your ideas for a concurrency_replication_causal_consistency.yml test suite compare to the one that xiangyu.yao added in SERVER-32883?

Comment by Jonathan Abrahams [ 05/Apr/18 ]

I think it makes sense to just have causal consistency enabled on the session.

william.schultz Would a new FSM test for reads within transactions be sufficient to satisfy that coverage, or should we design a new suite?

Comment by Tess Avitabile (Inactive) [ 05/Apr/18 ]

That is a good point. It is probably less valuable to test causal consistency for transactions, since we are not yet supporting read-only transactions on secondaries. It also could be hard to design a causal consistency suite for transactions that directs reads to secondaries, since we cannot yet direct reads to secondaries within a transaction--we can only direct entire read-only transactions to secondaries.

jonathan.abrahams, would you imagine that a causally consistent version of concurrency_replication would direct reads to secondaries or just run with causal consistency enabled on the session? And what do you think we should do with reads within transactions?

Comment by William Schultz (Inactive) [ 04/Apr/18 ]

Interestingly, I just learned that we are not going to officially support read-only transactions on secondaries in 4.0. If this is the case, causal consistency testing for transactions may be less meaningful. If we enable read-only transactions on secondaries behind a test-only flag, however, we could consider starting to test them now, even if they are not officially supported until 4.2.

Comment by William Schultz (Inactive) [ 04/Apr/18 ]

Yes, I think it would be valuable to have a concurrency_replication_causal_consistency suite, analogous to the existing sharding suite. If we were going to prioritize test suites to add for 4.0 however, it adding a more basic causally consistent transactions passthrough suite might be the thing to do first. This would be something like causally_consistent_jscore_txns_passthrough, since we don't get coverage of causal consistency with transactions via the core transactions tests. I added a note about this in the test plan. We should also include it on Max's prioritized list of testing work if we think it's worthwhile.

Comment by Tess Avitabile (Inactive) [ 04/Apr/18 ]

william.schultz, do you think it is important to have this test suite for 4.0? This would allow us to run multi_statement_transaction_simple.js with causal consistency. Do you think this is important test coverage?

Comment by Jonathan Abrahams [ 03/Apr/18 ]

We should make a new test suite for causal consistency.

Generated at Thu Feb 08 04:35:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.