Skip to content

Conversation

@belliottsmith
Copy link
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

@belliottsmith belliottsmith force-pushed the more-accord-metrics branch 4 times, most recently from c2f71a2 to 36c8733 Compare November 12, 2025 22:23
Copy link
Contributor

@ifesdjeen ifesdjeen left a comment

Choose a reason for hiding this comment

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

+1

the only question i have remaining is whether 0th percentile is meaningless.

in general, i am wondering if this holds:

        @Override
        public double getValue(double quantile)
        {
            return get((long)Math.ceil(totalCount * quantile));
        }

should we find min/max and then compute percentile indices based on those?

{
return Serialize.fromBytes(key, (ByteBuffer)shrunk);
ByteBuffer bb = (ByteBuffer)shrunk;
bb.position(prefixBytes(bb));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we duplicate here maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, good idea. we should be discarding it, but better safe than sorry and can do it without any net cost by skipping the internal duplicate

Timestamp trxTimestamp = cmd.txnId();
metrics.preapplyLatency.update(now - trxTimestamp.hlc(), TimeUnit.MICROSECONDS);
long elapsed = elapsed(cmd.txnId());
System.err.println("Recording preapply latency of " + elapsed + " for " + cmd.txnId());
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should this be trace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, whoops. sorry this was debugging

@belliottsmith
Copy link
Contributor Author

I've pushed improvements to getMin, getMax and getPercentile(0d)

@belliottsmith belliottsmith force-pushed the more-accord-metrics branch 5 times, most recently from 7c9143a to 2ce1eaa Compare November 13, 2025 13:10
Also Introduce:
 - Sharded/LogLinearDecayingHistogram
Also Improve:
 - Do not take a reference to CFK unless relevant
Also Fix:
 - Sharded/LogLinearHistogram
 - ExecuteFlags serialization bug in ReadData

patch by Benedict; reviewed by Alex Petrov for CASSANDRA-21017
@belliottsmith belliottsmith merged commit 494c3c7 into apache:trunk Nov 13, 2025
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.

2 participants