Skip to content

putShortVolatile is not volatile in InMemoryTrie#4820

Open
frankgh wants to merge 1 commit into
apache:trunkfrom
frankgh:CASSANDRA-21353
Open

putShortVolatile is not volatile in InMemoryTrie#4820
frankgh wants to merge 1 commit into
apache:trunkfrom
frankgh:CASSANDRA-21353

Conversation

@frankgh
Copy link
Copy Markdown
Contributor

@frankgh frankgh commented May 18, 2026

This commit fixes several issues found using the cassandra edge case explorer skill for the BTI feature. The majority are small findings.

Patch by Francisco Guerrero; reviewed by TBD for CASSANDRA-21353

This commit fixes several issues found using the Cassandra
edge case explorer skill for the BTI feature. The majority are
small findings.

Patch by Francisco Guerrero; reviewed by TBD for CASSANDRA-21353
final void putShortVolatile(int pos, short value)
{
getChunk(pos).putShort(inChunkPointer(pos), value);
getChunk(pos).putShortVolatile(inChunkPointer(pos), value);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potentially a copy-paste bug

ensuringInBuildInternalContext(operationType),
getIOOptions().flushCompression,
getCompressionDictionaryManager());
dataWriterOpened = true;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is missing setting dataWriterOpened. This doesn't seem to have any functional issues at the moment, but adding the fix for completeness

{
sstable.markSuspect();

if (reader != null)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when an exception occurs, we have a reader that might not get closed properly

// Follow end position while we still have a prefix, stacking path.
go(root);
while (true)
try
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is conforming to the implementation in org.apache.cassandra.io.tries.ValueIterator#initializeWithLeftBound

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.

1 participant