[SERVER-40010] Shard secondaries with 4.0 binary and 3.6 FCV are calling `_flushDatabaseCacheUpdates` Created: 07/Mar/19  Updated: 29/Oct/23  Resolved: 12/Mar/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.0.6
Fix Version/s: 4.0.7

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
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
Operating System: ALL
Steps To Reproduce:

Use a shard with 4.0 primary & 3.6 secondary and perform secondary reads with read concern local or majority.

Sprint: Sharding 2019-03-25
Participants:
Case:

 Description   

Currently, shard secondaries with 4.0 binary and 3.6 FCV call `_flushDatabaseCacheUpdates` against the primary node. This is wrong because the primary might be running a 3.6 binary, which doesn't have this command. As a result, in partial-upgrade cases, where a secondary node is on 4.0 and the primary is on 3.6 (with FCV 3.6), queries against the secondary will always fail with an error saying "CommandNotFound: no such command: '_flushDatabaseCacheUpdates'".

For some context:

  • 3.6 - introduced the versioned secondary reads and the forceRoutingTableRefresh/_flushRoutingTableCacheUpdates commands
  • 4.0 - introduced the database version concept, which ensures that all commands which read/write database and collection metadata are routed appropriately after a movePrimary or drop/recreate. This logic introduced the _flushDatabaseCacheUpdates command, which is only on 4.0, but is unconditionally called if the catalog cache is accessed on a secondary node.


 Comments   
Comment by Githook User [ 12/Mar/19 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-40010 Make only FCV 4.0 secondaries ask the primary to flush the database cache
Branch: v4.0
https://github.com/mongodb/mongo/commit/6df770b3a6dc44170389050a4063ffb027357b46

Generated at Thu Feb 08 04:53:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.