Skip to content

Commit 6ebc213

Browse files
kanchana-mongodbandf-mongodb
authored andcommitted
DOCS-13389 feature flag to turn on/off catalog cache refresh for a targeted shard
1 parent e15fcc3 commit 6ebc213

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

source/reference/parameters.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,6 +2534,36 @@ Sharding Parameters
25342534
- :serverstatus:`shardedIndexConsistency` metrics returned by the
25352535
:dbcommand:`serverStatus` commandq
25362536

2537+
.. parameter:: enableFinerGrainedCatalogCacheRefresh
2538+
2539+
.. versionadded:: 4.4
2540+
2541+
*Type*: boolean
2542+
2543+
*Default*: true
2544+
2545+
|both|
2546+
2547+
This parameter allows the catalog cache to be refreshed only if the
2548+
shard needs to be refreshed. If disabled, any stale chunk will cause
2549+
the entire chunk distribution for a collection to be considered stale
2550+
and force all :ref:`routers <sharded-cluster-query-routing>` who
2551+
contact the shard to refresh their shard catalog cache.
2552+
2553+
You can only set this parameter during start-up and cannot change
2554+
this setting using the :dbcommand:`setParameter` database command.
2555+
2556+
.. code-block:: sh
2557+
2558+
mongod --setParameter enableFinerGrainedCatalogCacheRefresh=true
2559+
mongos --setParameter enableFinerGrainedCatalogCacheRefresh=true
2560+
2561+
.. seealso::
2562+
2563+
- :ref:`sharding-background`
2564+
2565+
- :serverstatus:`shardingStatistics.catalogCache`
2566+
25372567
.. parameter:: maxTimeMSForHedgedReads
25382568

25392569
.. versionadded:: 4.4

source/release-notes/4.4.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,23 @@ Jumbo Chunk Migration
739739

740740
.. include:: /includes/extracts/4.4-changes-migrate-jumbo-chunks.rst
741741

742+
Improved Catalog Cache Refresh
743+
``````````````````````````````
744+
745+
Starting in 4.4, if there is a stale chunk, the catalog cache is only
746+
refreshed when :ref:`routers <sharded-cluster-query-routing>` access
747+
a shard that previously had or currently has that chunk.
748+
749+
Prior to MongoDB 4.4, any stale chunk caused the entire chunk distribution
750+
for a collection to be marked as stale and forced all
751+
:ref:`routers <sharded-cluster-query-routing>` who contact the shard
752+
to refresh their shard catalog cache. MongoDB 4.4 adds the
753+
:parameter:`enableFinerGrainedCatalogCacheRefresh` startup parameter
754+
for disabling catalog cache refresh for only a targeted shard and using
755+
the older catalog cache refresh behavior. The
756+
:parameter:`enableFinerGrainedCatalogCacheRefresh` parameter defaults to
757+
``true``.
758+
742759
Automatically Split ``system.sessions`` Collection
743760
``````````````````````````````````````````````````
744761

0 commit comments

Comments
 (0)