-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Cassandra 17774 #1751
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
Cassandra 17774 #1751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add @Override
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will go ahead and fix the other MBean methods that are missing it as well. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we recommend 20-30 buckets, but if there are 31, are we just going to silently cut off the oldest one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We could up this, make it a configurable, both, neither, ? Nothing jumps out at me as an immediately convenient way to indicate to the end user that the value has been truncated when hitting up the JMX endpoint, and since we're not including it in the tablestats output we don't have that outlet to indicate truncation. You have any clever ideas here? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only easy improvement I can think of is to raise it to something that won't truncate w/ a slight misconfiguration. 128 maybe? Failing the JMX call because there are too many buckets seems like a bad option...
@krummas Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Any way we can indent the concatenated streams here, so it's easier to read onward to filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ew. Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if sstableCountByBuckets is accessed directly by a JMX thread, I think we want to make it volatile here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subtle; good catch. This definitely opens this up to being accessed by multiple thread contexts. This tweak should give us slightly more up-to-date information in what we see via JMX if it just so happens to race w/the repair manager or compaction managers picking their next tasks. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given its temporality, I might be inclined to want to read oldest to newest left to right. Is the thought here to emulate what we do w/ LCS where the levels move left to right? (i.e. The age of the data moves left to right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't speak to the intent of the original author (will update commit message to reflect that it was Stefan's work; can check w/him), however the current shape of things is recency left to right, levels left to right, level 0 corresponding to "newest".
array index corresponds to level(int[0] is for level 0, ...)
array index corresponds to bucket(int[0] is for most recent, ...).
I don't really have an opinion on it excepting the current formatting provides logical symmetry between the two JMX calls and I like consistency even at the expense of intuition sometimes. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with keeping it like this.
Patch by Stefan Podkowinski; reviewed by CalebRackliffe and Marcus Eriksson for CASSANDRA-17774 Co-authored-by: Stefan Podkowinski <s.podkowinski@gmail.com> Co-authored-by: Josh McKenzie <jmckenzie@apache.org>
d63a4eb to
d784a82
Compare
- **Add failing test** - **CNDB-14153: Fix SAI updates (non-null solution)** ### What is the issue Fixes riptano/cndb#14153 ### What does this PR fix and why was it fixed This is meant as an alternative to datastax#1749. It fixes riptano/cndb#14153 by never returning `null` from the `UpsertTransformer`. apache#1749 is a more memory efficient solution, but has additional complexity, which is why I am proposing this as an alternative.
- **Add failing test** - **CNDB-14153: Fix SAI updates (non-null solution)** ### What is the issue Fixes riptano/cndb#14153 ### What does this PR fix and why was it fixed This is meant as an alternative to datastax#1749. It fixes riptano/cndb#14153 by never returning `null` from the `UpsertTransformer`. apache#1749 is a more memory efficient solution, but has additional complexity, which is why I am proposing this as an alternative.
No description provided.