-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CASSANDRA-16619: Add originating host ID to sstable metadata (trunk) #978
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-16619: Add originating host ID to sstable metadata (trunk) #978
Conversation
blambov
left a comment
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.
LGTM.
Please create a new ticket to generalize this mechanism to handle other pieces of metadata that are only meaningful for the originating node.
dc022b8 to
0cc6550
Compare
- md, me, nb sstables - Update version to nb, update MetadataSerializerTest - add missing test cases in MetadataSerializerTest Co-authored-by: Jakub Zytka <jakub.zytka@datastax.com> Co-authored-by: Jacek Lewandowski <jacek.lewandowski@datastax.com>
0cc6550 to
0b88659
Compare
| } | ||
|
|
||
| if (!skippedSSTables.isEmpty()) { | ||
| logger.warn("Origin of {} sstables is unknown or doesn't match the local node; commitLogIntervals for them were ignored", skippedSSTables.size()); |
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.
We can get a big number here after upgrade. Perhaps it makes sense to add some info about that - that this is nothing to worry about?
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.
hmm... I think I can add more information
| hasCommitLogLowerBound = version.compareTo("mb") >= 0; | ||
| hasCommitLogIntervals = version.compareTo("mc") >= 0; | ||
| hasAccurateMinMax = version.compareTo("md") >= 0; | ||
| hasOriginatingHostId = version.matches("(m[e-z])|(n[b-z])"); |
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.
o* versions are good too ;)
Noone's gonna remember to change this if o is ever introduced/
I think we need to make some comparisons with version.compareTo("nb") >= 0 being the last
| testMetricsWithStreamingToTwoNodes(true); | ||
| } | ||
|
|
||
| private int getNumberOfSSTables(Cluster cluster, int node) { |
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.
could you please elaborate what do these changes fix?
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.
hehe... this is in-jvm distributed test. I assumed exact number of sstables in various stages of the test case. After adding that sentinel to commit log replayer, there is one extra sstable created because local host id is unknown. And it is unknown because the server is running in a kind of degraded mode (for speeding up tests, etc).
| * </p> | ||
| */ | ||
| @Ignore | ||
| // @Ignore |
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 believe we want this @Ignore back, once the serialization samples have been generated
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.
ah yes, indeed
|
|
||
| @Test | ||
| public void testMaReadMc() throws IOException | ||
| private void testVersions(String... versions) throws Throwable |
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 propose testOldReadsNew name (and similarly for testOldReadsNewMVersions and testOldReadsNewNVersions). This is the crux of the test, but with the current name it's hidden in the very details of the implementation.
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.
ok
|
Merged manually |
Optimize the `ChunkCache#invalidateFile` method by introducing a map that keeps track of the file to key set in the `ChunkCache`. The current solution is costly, as it iterates over the whole cache.
No description provided.