[
https://issues.apache.org/jira/browse/CASSANDRA-15945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17159542#comment-17159542
]
Yifan Cai commented on CASSANDRA-15945:
---------------------------------------
PR: [https://github.com/apache/cassandra/pull/682]
Code:
[https://github.com/yifan-c/cassandra/tree/CASSANDRA-15945-verify-sstable-components]
Test: [https://app.circleci.com/pipelines/github/yifan-c/cassandra]
The patch provides the best-effort verification based on the entries in TOC
file to verify the existence of the required {{CompressionInfo}} component,
when opening a sstable.
If the TOC file does not exist, the verification is a no-op.
It only verifies the {{CompressionInfo}} component, because the other
components are either mandatory and verified or we rebuild them on opening.
Only the compressionInfo is mandatory when compression is enabled but no
verification for it in the code base yet.
See the table below.
_Mandatory: must present on opening. Optional: can be absent on opening._
||Component||Note||
|DATA|Mandatory. Verified.|
|PRIMARY INDEX|Mandatory (if with validation). Verified.|
|FILTER|Optional. Recreate if needed|
|COMPRESSION INFO|Mandatory if compression enabled. |
|STATS|Mandatory. Verified|
|DIGEST|Optional. |
|CRC|Optional.|
|SUMMARY|Optional.|
|TOC|Optional.|
> Verify expected SSTable components are present at startup
> ---------------------------------------------------------
>
> Key: CASSANDRA-15945
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15945
> Project: Cassandra
> Issue Type: Bug
> Components: Local/SSTable
> Reporter: Yifan Cai
> Assignee: Yifan Cai
> Priority: Normal
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When Cassandra batch opens all sstables at startup, it should check that all
> components listed in the TOC.txt are available. Compression is optional, so
> there may not be a Compression.db component for all sstables, but if there
> should be and it's missing we continue to load the sstable. The sstable is
> unreadable without the compression metadata though, but we won't know this
> until it's touched by a query or compaction.
> To reliably use TOC.txt for verification, it needs CASSANDRA-10709
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]