Skip to content

Conversation

@djatnieks
Copy link

@djatnieks djatnieks commented Mar 13, 2025

What is the issue

On main-5.0, CQLSSTableWriterDaemonTests testWriteWithSAI and testSkipBuildingIndexesWithSAI are failing. This has been happening since commit:

Reapply "CC5 default memtable to TrieMemtable"	ec7bd7137a	Brandon Williams <[email protected]>	Mar 6, 2025 at 9:25 AM

The error reported is:

class org.apache.cassandra.dht.ByteOrderedPartitioner$BytesToken cannot be cast to class org.apache.cassandra.dht.Murmur3Partitioner$LongToken (org.apache.cassandra.dht.ByteOrderedPartitioner$BytesToken and org.apache.cassandra.dht.Murmur3Partitioner$LongToken are in unnamed module of loader 'app')

What does this PR fix and why was it fixed

I am not really sure why changing the memtable default to TrieMemtable led to these tests failing, because the test/conf/cassandra.yaml that sets the ByteOrderedPartitioner has not changed.

Whatever the interaction that changed, SAI does not work with ByteOrderedPartitioner, so these tests started failing.

The best solution I could come up with is to add CQLSSTableWriterDaemonMurmur3Test that overrides the test yaml to use Murmur3Partitioner.

Along with that I needed to annotate tests in CQLSSTableWriterTest to work with the subclass variations:

  • CQLSSTableWriterClientTest - all tests pass
  • CQLSSTableWriterDaemonTest - skip SAI tests, all others pass
  • CQLSSTableWriterDaemonMurmur3Test - skip certain non-SAI tests, all others pass

It works, but I am open to a better solution or other ideas.

Also any clarification of just why changing to TrieMemtable caused the errors would be helpful and might suggest some better solution.

@github-actions
Copy link

Checklist before you submit for review

  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits

CQLSSTableWriterDaemonTest SAI tests only work with Murmur3Partitioner, but other tests only work with the default ByteOrderedPartitioner;
Use JUnit assumeTrue along with new CQLSSTableWriterDaemonMurmur3Test class to cover variations: clientInitialization, daemonInitialization with (default) ByteOrderedPartitioner, and daemonInitialization with Murmur3Partitioner.
@djatnieks djatnieks force-pushed the cc5-fix-CQLSSTableWriterTest branch from d1bd85a to 118c52a Compare March 13, 2025 21:29
@sonarqubecloud
Copy link

@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-1630 rejected by Butler


33 new test failure(s) in 2 builds
See build details here


Found 33 new test failures

Showing only first 15 new test failures

Test Explanation Branch history Upstream history
r.TestAllowFiltering.test_consistent_wide_table regression 🔴🔴
....ChunkCacheLoadingTest.testChunkAsyncLoadThrows regression 🔴🔴
o.a.c.c.QueryEventsTest.batchTest regression 🔴🔴
o.a.c.c.v.o.CreateTest.testCreateTableWithMemtable regression 🔴🔴
...adCommitLogAndSSTablesWithDroppedColumnTestCC40 regression 🔴🔴
...adCommitLogAndSSTablesWithDroppedColumnTestCC50 regression 🔴🔴
...thRestartTest.testReadingValuesOfDroppedColumns regression 🔴🔴
...sponseDoesNotLogTest.dispatcherErrorDoesNotLock regression 🔴🔴
o.a.c.d.t.FrozenUDTTest.testDivergentSchemas regression 🔴🔴
...epairTruncationTest.testTruncateDuringIncRepair regression 🔴🔴
...ersionTest.v4ConnectionCleansUpThreadLocalState regression 🔴🔴
...t.testKDTreePostingsQueryMetricsWithSingleIndex regression 🔴🔴
o.a.c.r.FailingRepairFuzzTest.failingRepair regression 🔴🔴
...TransportTimeoutTest.testAsyncStageLoadShedding regression 🔴🔴
o.a.c.t.TransportTest.testAsyncTransport regression 🔴🔴

Found 8910 known test failures

@djatnieks
Copy link
Author

Closing in favor of #1682

@djatnieks djatnieks closed this Apr 9, 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.

3 participants