-
Notifications
You must be signed in to change notification settings - Fork 35
Commit 37f7e94
committed
MB-45990 (7.1.0 1910) Active indexes reported building in system_indexes
Fixes a problem where metadataClient's cached slice of scheduled plus
existing indexes can be stale but it does not notice because the cache-
invalidating changes are not synced with cache invalidation itself. This
could lead to indexes showing as "building" forever in metadataClient
output because it missed a cache-invalidating event and kept returning
a stale cached list of scheduled plus existing indexes.
The replacement algorithm requires all changes to
1. indexers.allIndexes[] -- all currently existing indexes
2. schedTokenMon.scheduledIndexes[] -- all currently scheduled indexes
3. comboIndexes[] -- cached combination of #1 and #2
to be done inside a new mutex, comboIndexesMut. Additionally, the cache
must be invalidated (by setting comboIndexes = nil) inside the same
instance of locking comboIndexesMut as any change to allIndexes or
scheduledIndexes. These behaviors maintain the cache coherency of
comboIndexes by ensuring that whenever it is computed, its content is
in sync with both of its inputs (#1 and #2), and whenever one of its
inputs is changed, comboIndexes gets set back to nil in the same
critical section so cache-invalidating changes can never be missed.
Change-Id: I64ab1a743fec76acb2e969089412039337382f331 parent 3e1dff8 commit 37f7e94Copy full SHA for 37f7e94
File tree
Expand file treeCollapse file tree
1 file changed
+151
-160
lines changedFilter options
- secondary/queryport/client
Expand file treeCollapse file tree
1 file changed
+151
-160
lines changed
0 commit comments