-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.2.0
-
Component/s: Sharding
-
None
-
Sharding
-
ALL
-
8
Sequence:
1. Shard collection on primary, version is now (1,0|e1).
2. Metadata refresh happens, insert { refreshing: true } to config.cache.collections.
3. Metadata refresh finish, update config.cache.collections with { refreshing: false, lastRefreshedCollectionVersion: (1,0) }
4. Change shard key on same collection, version is now (1,0|e2)
5. Metadata refresh happens, update { refreshing: true } to config.cache.collections.
6. Metadata refresh finish, update config.cache.collections with { refreshing: false, lastRefreshedCollectionVersion: (1,0) }. However, since lastRefreshedCollectionVersion didn't change, oplog entry will not contain it.
So, if a secondary refresh happened in between step 5 & 6, it will block on a notification waiting for refresh false. However, the condition for triggering the refresh requires lastRefreshedCollectionVersion to be present in the oplog, it will be missed. And it will block until the next refresh bumps the version higher.
- is related to
-
SERVER-43217 Secondaries can hang refreshing metadata if only collection's epoch changes
- Closed