summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog_cache.h
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2018-04-02 23:28:05 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2018-04-03 14:11:09 -0400
commite0fa11ce6d6e1ad1fa6a85592d6d4fc20b4f6988 (patch)
treeaccaae1f114e0eb589d71082b713eed5736192c8 /src/mongo/s/catalog_cache.h
parent4952085fcdecaaffed00855f8271ffa984a5d4ae (diff)
downloadmongo-e0fa11ce6d6e1ad1fa6a85592d6d4fc20b4f6988.tar.gz
SERVER-34272 add CatalogCache::onStaleDatabaseVersion() to mark an existing database entry as needs refresh
Diffstat (limited to 'src/mongo/s/catalog_cache.h')
-rw-r--r--src/mongo/s/catalog_cache.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mongo/s/catalog_cache.h b/src/mongo/s/catalog_cache.h
index a201a82be8e..c1394a000d8 100644
--- a/src/mongo/s/catalog_cache.h
+++ b/src/mongo/s/catalog_cache.h
@@ -116,10 +116,19 @@ public:
OperationContext* opCtx, const NamespaceString& nss);
/**
- * Non-blocking method to be called whenever using the specified routing table has encountered a
- * stale config exception. Returns immediately and causes the routing table to be refreshed the
- * next time getCollectionRoutingInfo is called. Does nothing if the routing table has been
- * refreshed already.
+ * Non-blocking method that marks the current cached database entry as needing refresh if the
+ * entry's databaseVersion matches 'databaseVersion'.
+ *
+ * To be called if routing by a copy of the cached database entry as of 'databaseVersion' caused
+ * a StaleDbVersion to be received.
+ */
+ void onStaleDatabaseVersion(const StringData dbName, const DatabaseVersion& databaseVersion);
+
+ /**
+ * Non-blocking method that marks the current cached collection entry as needing refresh if its
+ * collectionVersion matches the input's ChunkManager's collectionVersion.
+ *
+ * To be called if using the input routing info caused a StaleShardVersion to be received.
*/
void onStaleShardVersion(CachedCollectionRoutingInfo&&);