Skip to content

Fixes 260226#4738

Open
belliottsmith wants to merge 1 commit intoapache:trunkfrom
belliottsmith:fixes-260226
Open

Fixes 260226#4738
belliottsmith wants to merge 1 commit intoapache:trunkfrom
belliottsmith:fixes-260226

Conversation

@belliottsmith
Copy link
Copy Markdown
Contributor

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

@aweisberg
Copy link
Copy Markdown
Contributor

+1

@belliottsmith belliottsmith force-pushed the fixes-260226 branch 4 times, most recently from 848bd6f to 8506aad Compare May 8, 2026 08:47
if ((flags & NEW_PREFIX) != 0)
{
prefix = KeySerializers.routingKey.deserializePrefix(in);
fixedLength = KeySerializers.routingKey.fixedKeyLengthForPrefix(in);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be prefix instead of in

size += KeySerializers.routingKey.serializedSizeWithoutPrefixOrLength(e.start());
}
if (fixedLength < 0)
size += VIntCoding.sizeOfUnsignedVInt(KeySerializers.routingKey.serializedSizeWithoutPrefixOrLength(e.start()));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be e.end() ? (if so, I think size computation should be adjusted accordingly)

compressed.putShort(SIZE_OF_HEADER - 2, Shorts.checkedCast(length));
compressed.position(SIZE_OF_HEADER);
checksum.update(compressed);
compressed.putLong(0, checksum.getValue());
Copy link
Copy Markdown
Contributor

@ifesdjeen ifesdjeen May 8, 2026

Choose a reason for hiding this comment

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

Do we need to call reset here? Or do you want to accumulate checksum?
(since this is symmetrical with deser, I am assuming this is intentional, but since its unusal, I thought I'd ask)

int i = 2;
while (true)
{
PartitionKey next = pk(i, "ks", "tbl");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did you want to iterate through different keys there?

public void replay(CommandStore commandStore, ReplayMode replayMode, long minSegmentId)
{
Long2LongHashMap minSegments = new Long2LongHashMap(0);
minSegments.put(commandStore.id(), minSegmentId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minSegments is built but never passed;
pre-existing code, but got flagged because of the diff

this.compressor = compressor;
this.checksum = checksum;
this.channel = channel;
this.compressed = compressor.preferredBufferType().allocate(frameSize);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't we need to override close same as output?

    @Override
    public void close() throws IOException
    {
        super.close();
        MemoryUtil.clean(compressed);
        compressed = null;
    }

@belliottsmith belliottsmith force-pushed the fixes-260226 branch 2 times, most recently from d9cc725 to a6448da Compare May 8, 2026 22:30
 - Clean Shutdown/Restart
 - Rebootstrap to allow nodes to rejoin consensus if they are out of sync, or did not shutdown cleanly
Improve:
 - Improve efficiency of BTreeReducingRangeMap
 - DurableBefore backed by BTreeReducingRangeMap
 - Soft reject new transactions when a replica has a backlog of work
 - system_accord_debug.command_store_ops supports starting journal replay
Fix:
 - Ensure SequentialExecutor.owner is unset only by the owner
 - Detect and avoid taking two AccordExecutor locks simultaneously
 - MaxConflicts serializer
 - tryToExecuteListening after replay, to handle invalidated dependencies
 - TxnNamedRead does not close a RowIterator, leading to native memory leaks
 - GetLatestDepsNack serialization
 - journal.readLast() did not read last
 - DefaultRemoteListeners not correctly synchronised
 - RangeTxnScanner cancellation assumes was already started
 - Start cfk compaction before replay
 - txn_graph should avoid visiting parents twice (possible if two different dependency chains connecting them in the graph)
 - Topology.cloneEquivalentWithEpoch should also share nodeLookup and ranges, especially to accelerate computeWaitForEpoch/computeScope
 - Do not invoke slowReplicaDelay or slowCoordinatorDelay during restore
 - Do not fail if slowReplicaDelay or slowCoordinatorDelay are invoked without knowing the transaction

patch by Benedict; reviewed by Alex Petrov and Ariel Weisberg for CASSANDRA-21355
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.

3 participants