Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: I64ab1a743fec76acb2e969089412039337382f33
- Loading branch information