[SERVER-60737] Remove incorrect chunk timestamp check from ShardServerCatalogCacheLoaderTest Created: 15/Oct/21  Updated: 29/Oct/23  Resolved: 15/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0
Fix Version/s: 5.0.4

Type: Task Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2021-10-18
Participants:
Linked BF Score: 50

 Description   

This assert in ShardServerCatalogCacheLoaderTest_PrimaryLoadFromShardedWithChangeOnMetadataFormatBecauseUpgrade is incorrect. Under particular interleaving of the unit test thread and ShardServerCatalogCacheLoader thread, it is can fail.

The test sets up a situation where the SSCCL has seen some chunks with their 'timestamp' field set, but the collection entry still without 'timestamp'. Later, the test expects the SSCCL to return the 'timestamp' set for those chunks that had it. This only works if the SSCCL has not persisted the chunks to disk yet (and in practice, in the test is very likely to not have persisted it).

If the SSCCL had time to persist the disk, it would have done it without the timestamp (as expected). Upon reading, the SSCCL will read the persisted chunks, then[ if the persisted collection had 'timestamp', it would add the 'timestamp' to the chunks|https://github.com/mongodb/mongo/blob/0d369af9f5be858fb06ed7c8013e05365288dcb0/src/mongo/db/s/shard_metadata_util.cpp#L302]. In the situation of the test, the collection still does not have 'timestamp', so the returned chunks wouldn't have it.

This is the expected behavior of the SSCCL, so the check needs to be removed.



 Comments   
Comment by Githook User [ 15/Oct/21 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-60737 Remove incorrect chunk timestamp check from ShardServerCatalogCacheLoaderTest
Branch: v5.0
https://github.com/mongodb/mongo/commit/0fee1e4a5c2a188f24166d06f1e6fe120017dadd

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