-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.1.0
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v5.1
-
Sharding EMEA 2021-11-01
-
157
Reasons:
- With the new splitter algorithm (
SERVER-55028+SERVER-60009) it must not be possible to end up with more chunks than expected. - The chunk splitter task is spawned by the sharding observer before the actual commit of the WriteUnitOfWork of the insert operation that is being observed. So it is actually possible for the last splitting round to be a no-op if the insert has not committed yet at the time of index scanning (intermediate split rounds could fail as well but subsequent ones would catch-up the missing splits).
Tests to change:
- shard_existing_coll_chunk_count.js: Since the purpose of the test is to verify that the chunk splitter is not creating too many chunks, the greaterThanOrEqual check must be changed with a lessThanOrEqual check.
- other autosplit js tests: check expected number of chunks or one less, due to reason 2