-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Serverless
-
Fully Compatible
-
ALL
-
Server Serverless 2023-07-10, Server Serverless 2023-07-24, Server Serverless 2023-08-07, Server Serverless 2023-08-21
-
105
Shard merge does non-timestamped catalog writes when importing collections (i,e, collections created during physical cloning phase). But, does timestamped catalog writes when dropping those collections. This mixed timestamp mode usage can trigger invariant failure in HistoricalCatalogIdTracker which was introduced to support point-in-time catalog lookups PM-2218.
Noting the problematic sequence here.
- Fixture starts migrationId1.
- Recipient imports the donor collection say <tenanId1>_db.coll untimestamped.
a) <catalogRecordID<X>, boost::none TS> entry gets inserted into HistoricalCatalogIdTracker for this nss. - migrationid1 get committed.
- Fixture drops the collection <tenanId1>_db.coll but it’s timestamped writes with dropTS as TS(100).
a) <boost::none, TS(100)> entry gets inserted into HistoricalCatalogIdTracker for this nss. - Fixture starts another migrationId2.
- Recipient imports the donor collection say <tenanId1>_db.coll untimestamped.
a) This will skip inserting entry into HistoricalCatalogIdTracker as HistoricalCatalogId list is non-empty for this nss. - When the oldest ts is no longer < TS(100), TimestampMonitor deletes the expired 2-a) and 4-a) entries from HistoricalCatalogIdTracker.
- migrationid2 get committed.
- Fixture drops the collection <tenanId1>_db.coll but it’s timestamped writes.
a) This throws the invariant failure because HistoricalCatalogId list is empty for this nss.