Question about split command of RheaKV
See original GitHub issueYour question
I have a question about RheaKV architecture.
This is unclear to me, how the following situation is handled:
Imagine that we have several puts (let’s call them [put1, put2]) to some range A (to be more precise, these puts are related to the right part of range A, let’s say that this range is called A2), but these commands haven’t been committed to the corresponding raft group of a Region.
At that moment we receive split command, so range A will be splitted to A1 and A2, which means that a new raft group will be created for A2.
At this time we have new puts ([put3, put4]) that are related to the range A2, and to a new raft group for that range.
How will the uncommitted puts [put1, put2] be handled? To be more precise, in which order put1, put2, put3 and put4 will be applied and saved to RocksRawKVStore
?
I was expected, that before we update the info about new ranges in PD, we somehow ensure that all uncommitted changes before the split command will be applied to SM of replicas, but I couldn’t find a place in the code with such logic.
Seems, that I miss some key ideas of replication layer of RheaKV, I would be glad if you could help me to understand this case. Thank you in advance!
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
You mean to execute in the following order?
If I got that, you are asking how else can we guarantee such an execution order under such conditions: [put1,put2,put3,put4]
My answer is that it is not guaranteed, because the sequential nature is only valid for the same raft group,and we should not rely on this sequential nature.
FencingToken is for
DistributedLock
, and the value(token) of the newly region must be larger than its father’s value for the distributed lock to work fine. Some details herePlease create a separate issue for that, Thank you!