Product: Couchbase Server
Component: index-service
Issue Link: MB-63193
Affects Version(s): 7.6.2
Fix Version(s): 7.6.3
Summary
- During a file based rebalance, it is possible for partitions to be missed by the Projector process, leading to these partitions failing to be updated with new mutations.
Symptoms
- Partitions falling behind within an index may indicate this issue.
- For a single index, it's hard to detect unless queries return incorrect results.
- With multiple indexes, if one index (main and/or replica) lags behind others on some partitions, despite no pending mutations, this can be a sign.
- If no rebalances have occurred, or File Based Rebalancing isn’t enabled, these symptoms are unrelated to this issue.
Triggers
- Any rebalance involving File Based Rebalancing (FBR) and partitioned indexes can trigger this behavior.
- A race condition may occur if a partition merge doesn’t finish before the next build starts.
- Partitions not merged in time can be overwritten and lost within the projector.
- This issue only arises during partition rebalances with FBR.
Verification
- Identify problematic partitions by comparing item counts against replica partitions since the last rebalance (problematic partition will not have increased in size).
- Once identified, locate the instance ID (InstId) for the affected partitions in the logs.
- In this example, partitions 2, 1, and 7 are being moved (15269458424720392459, 5428832503800560075, and 13186856225341759055).
- During rebalance, affected partitions will begin to be merged after a handleBuildRecoveredIndexes call in the logs.
- Notice the InstId matching one of the 3 partitions.
- After this merge begins but has not yet completed, another build will begin for the moved partitions:
- At this stage, several partitions of the original merge are now lost (1 and 7 in this example)
- Afterwards, it's seen that the merge completes for the original merge:
- If the merges complete BEFORE any new handleBuildRecoveredIndexes appears within the logs, then it is unlikely this issue is present.
Workarounds
- Restarting the projector will allow it to recover the lost partitions; however, mutations that would have been added to them have already been processed and will not be retroactively added.
- As a result, dropping and recreating the indexes from scratch is the best way forward, as it brings the indexes to a consistent state.
Comments
0 comments
Article is closed for comments.