question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question about split command of RheaKV

See original GitHub issue

Your 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:open
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fengjiachuncommented, Jun 23, 2022

You mean to execute in the following order?

  1. do split
  2. [put1, put2]
  3. [put3, put4]

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 here

0reactions
fengjiachuncommented, Jun 24, 2022

Please create a separate issue for that, Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release notes - SOFAStack
The JRaft-RheaKV implemented auto range split. When placementDriver(pd) is enabled, the pd can calculate and issue the range split command ...
Read more >
Split Command in Linux with Examples - GeeksforGeeks
Split command in Linux is used to split large files into smaller files. It splits the files into 1000 lines per file(by default)...
Read more >
Regarding Java Split Command Parsing Csv File
The problem is that split discards empty matches at the end: This method works as if by invoking the two-argument split method with...
Read more >
Dataset disappears when I use split file - Forums - IBM Support
I am trying to use the split file function on SPSS to organize my output my gender. ... If the question is related...
Read more >
how to recover data splitted by split command - Super User
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found