diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-08-31 16:11:16 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-09-02 12:11:27 -0400 |
commit | 0b658fdc266a13a042a31ab2a46182dac838459a (patch) | |
tree | 6e87273f65666438ec56fcfb4a74273b34482778 /src/mongo/s/grid.h | |
parent | 0fab941d48dec833d6b59b723292fb528219189e (diff) | |
download | mongo-0b658fdc266a13a042a31ab2a46182dac838459a.tar.gz |
SERVER-20040 Access the ForwardingCatalogManager explicitly when needed, otherwise use the CatalogManager interface
Diffstat (limited to 'src/mongo/s/grid.h')
-rw-r--r-- | src/mongo/s/grid.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h index 0eeaa2de3db..6e09dbdc0e1 100644 --- a/src/mongo/s/grid.h +++ b/src/mongo/s/grid.h @@ -93,8 +93,19 @@ public: */ bool getConfigShouldBalance(OperationContext* txn) const; - ForwardingCatalogManager* catalogManager(OperationContext* txn); // TODO(spencer): remove - ForwardingCatalogManager* catalogManager(); + /** + * Returns a pointer to a CatalogManager to use for accessing catalog data stored on the config + * servers. + */ + CatalogManager* catalogManager(OperationContext* txn); + + /** + * Returns a direct pointer to the ForwardingCatalogManager. This should only be used for + * calling methods that are specific to the ForwardingCatalogManager and not part of the generic + * CatalogManager interface, such as for taking the distributed lock and scheduling replacement + * of the underlying CatalogManager that the ForwardingCatalogManager is delegating to. + */ + ForwardingCatalogManager* forwardingCatalogManager(); CatalogCache* catalogCache() { return _catalogCache.get(); |