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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When user writes data to
oxia, the corresponding request (such asWriteRequest) is processed by theLeader. TheLeaderfirst writes the request information to thewal, then asynchronously replicate the data to theFollowerthroughReplicationStream, 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 theFollowerwill wait for theCommitOffsetupdate from theLeaderbefore applying the logs to the state machine.When a new
Leaderstarts, it will also read out all data from thewaland 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
walinformation are crucial inoxiasystem. This proposal verifies the accuracy of the data by addingcrcto thewalentry.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
crcto thewalentryNon-Goals
Proposal
User Stories
Risks and Mitigations
Design Details
Data crc,If current Segment File is first segment,it CRC Entry's value is 0waldata is persistent as Log EntryEntry Length,8-bytesPrevious Segment CRCEntry Length,8x-bytesEntry Data,8-bytesPrevious Segment CRCEntry Type, current we supportCrc EntryandLog EntryEntry Padding, it's value is 0-7,because we will paddingEntry Datato 8x-bytes length, for example, ifEntry Datais 9-bytes, we will padding it to 16-bytes,and setEntry Paddingto 7Entry Datalength as bytesTest Plan
Add ALICE tests.
Upgrade / Downgrade Strategy
Because
oxiadidn'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