[SERVER-46214] make autosplit_low_cardinality.js wait for all chunkSplit op after every insert Created: 17/Feb/20  Updated: 29/Oct/23  Resolved: 06/Mar/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 4.3.3
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:

Add sleepsecs(3) here https://github.com/mongodb/mongo/blob/95c8fc6a4a98f70b07f32565e3ef3e48172efa1e/src/mongo/db/s/chunk_splitter.cpp#L338

autosplit_low_cardinality.js will fail

Sprint: Sharding 2020-02-24, Sharding 2020-03-09, Sharding 2020-03-23
Participants:
Linked BF Score: 19

 Description   

The autosplit functionality is best effort. In fact if we run two insert that should both trigger trigger an autosplit on the same shard, it is not guarantee that the second insert will actually cause a chunk split.
This is the case when the second insert call a ChunkSplitStateDriver::tryInitiateSplit while a previous chunk split operation is still running. The second attempt will be simply abandoned without any retry logic.

This is similar to SERVER-43960, we need to call waitForOngoingChunkSplits() after every insertion.



 Comments   
Comment by Githook User [ 23/Mar/20 ]

Author:

{'name': 'Tommaso Tocci', 'username': 'toto-dev', 'email': 'tommaso.tocci@mongodb.com'}

Message: SERVER-46214 make autosplit_low_cardinality.js wait for all chunkSplit operations after every insert

(cherry picked from commit 3d7ca6d09f0b49c3a8a142105261a7cd896da8d3)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c2d9e718ed392e43ac528d2bd20c20369d6941ea

Comment by Githook User [ 06/Mar/20 ]

Author:

{'name': 'Tommaso Tocci', 'username': 'toto-dev', 'email': 'tommaso.tocci@mongodb.com'}

Message: SERVER-46214 make autosplit_low_cardinality.js wait for all chunkSplit operations after every insert
Branch: master
https://github.com/mongodb/mongo/commit/3d7ca6d09f0b49c3a8a142105261a7cd896da8d3

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