Replies: 2 comments 1 reply
-
@lsytj0413 Sorry for long time to get feedback here. A couple of thoughts:
We should also describe few examples on how the CRC will be used:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
close because #538 already implement it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
When user writes data to
oxia
, the corresponding request (such asWriteRequest
) is processed by theLeader
. TheLeader
first writes the request information to thewal
, then asynchronously replicate the data to theFollower
throughReplicationStream
, waits for the number of nodes in the Quorum to persist the data to thewal
, and then applies the log to the state machine throughCommitOffset
. And theFollower
will wait for theCommitOffset
update from theLeader
before applying the logs to the state machine.When a new
Leader
starts, it will also read out all data from thewal
and apply it to the state machine, and then start accepting user requests (here, a lock is used to ensure that only one operation is being executed).The accuracy and consistency of the
wal
information are crucial inoxia
system. This proposal verifies the accuracy of the data by addingcrc
to thewal
entry.Motivation
The main goal is to avoid Data corruption in
wal
, which may occur at multiple levels, such as when only a portion of the data is written, or when unknown errors occur during data storage, resulting in certain bytes in the data being scrambled.Goals
crc
to thewal
entryNon-Goals
Proposal
User Stories
Risks and Mitigations
Design Details
Data crc
,If current Segment File is first segment,it CRC Entry's value is 0wal
data is persistent as Log EntryEntry Length
,8-bytesPrevious Segment CRC
Entry Length
,8x-bytesEntry Data
,8-bytesPrevious Segment CRC
Entry Type
, current we supportCrc Entry
andLog Entry
Entry Padding
, it's value is 0-7,because we will paddingEntry Data
to 8x-bytes length, for example, ifEntry Data
is 9-bytes, we will padding it to 16-bytes,and setEntry Padding
to 7Entry Data
length as bytesTest Plan
Add ALICE tests.
Upgrade / Downgrade Strategy
Because
oxia
didn't release stable version,so we plan didn't support previous version to upgrade.Alternatives
Future possibilities
Beta Was this translation helpful? Give feedback.
All reactions