Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent segment inconsistencies #4129

Merged
merged 15 commits into from
Feb 14, 2024
Merged

Prevent segment inconsistencies #4129

merged 15 commits into from
Feb 14, 2024

Conversation

jeroiraz
Copy link
Contributor

@jeroiraz jeroiraz commented Feb 2, 2024

  • integrity checking into lsm wal files (new versioned wal file format)
  • file syncing when a memtable is dumped as a segment
  • crash tolerant segment-compaction

Integrity checking was added to WAL files in a backward compatible manner. The new WAL entries data format is defined as follows:

 |---------------------------|
 |  version == 0 (1byte)  |
 |  record (dynamic length)  |
 |---------------------------|

-------------------------------------------------------
|  version == 1 (1byte)  |
|  type (1byte)   |
|  node length (4bytes)    |
|  node (dynamic length)   |
|  checksum (crc32 4bytes non-checksum fields so far)  |
-------------------------------------------------------

What's being changed:

Memtable serialization into a Segment file and Segment compaction process with stronger crash-tolerance

Review checklist

  • Documentation has been updated, if necessary. Link to changed documentation:
  • Chaos pipeline run or not necessary. Link to pipeline:
  • All new code is covered by tests where it is reasonable.
  • Performance tests have been run or not necessary.

@parkerduckworth
Copy link
Member

LGTM, but I am going to run this through the chaos pipeline now, before we merge this.

Also @amourao are you ok with all the explanations in your unresolved threads?

Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo <jeronimo.irazabal@gmail.com>
Copy link

sonarcloud bot commented Feb 14, 2024

Quality Gate Passed Quality Gate passed

Issues
7 New issues

Measures
0 Security Hotspots
No data about Coverage
2.6% Duplication on New Code

See analysis details on SonarCloud

@jeroiraz jeroiraz merged commit 61c4f2f into master Feb 14, 2024
32 of 33 checks passed
@jeroiraz jeroiraz deleted the chore/consistency branch February 14, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants