Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
master
Description
Summary
When an active vbucket is to be moved to another node, the steps are as follows:
- Create vbucket in state pending - request originates from ns_server
- Add NON-takeover stream for the vbucket - this is for the backfill phase
- close stream
- Add takeover stream for vbucket - this is for the takeoverphase
- Move to pending state (Note: already in pending state) - originates from DCP stream
- Move to active state - originates from the DCP stream
- close stream
- move to active state (Note: already in active state) - originates from ns_server
The issue is that a vbucket can be in a pending state for potentially a long period of time, whilst waiting for the backfill phase and persistence of the highest seqno to complete.
This is not ideal because when a vbucket is in a pending phase KV does not respond to any operations sent to it. Instead it adds the operation to a pending operations list, which are processed when the vbucket becomes active.
Details
My understanding is that ns_server made the change in 4.5 to set the vbucket state to pending prior to initiating the backfilling phase. The change was made based on discussions with Chiyoung where he had mentioned that items in replica vBuckets are more likely to be evicted.
In 5.5.0 we introduced a new eviction policy and while it is still true that we are more aggressive evicting from replica buckets than active, we don't believe this requires us to remain in a pending state whilst backfill and persistence and persistence is performed. Instead we would much prefer the vbucket to be in a replica state.
Attachments
Issue Links
- relates to
-
MB-33683 GET_REPLICAs can take a very long time to complete
- Closed
Gerrit Reviews
For Gerrit Dashboard: MB-33734 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
108254,3 | MB-33734: Set future master to replica state initially | master | ns_server | Status: NEW | +1 | 0 |