Skip to content

CASSANDRA-18254: sstabledump for secondary index sstable error - #5077

Open
lakshaym7 wants to merge 1 commit into
apache:cassandra-4.0from
lakshaym7:cassandra-4.0
Open

CASSANDRA-18254: sstabledump for secondary index sstable error#5077
lakshaym7 wants to merge 1 commit into
apache:cassandra-4.0from
lakshaym7:cassandra-4.0

Conversation

@lakshaym7

Copy link
Copy Markdown

https://issues.apache.org/jira/browse/CASSANDRA-18254

sstabledump threw UnsupportedOperationException when dumping a
secondary-index sstable, because the base table's partition-key column
is carried into the index as a clustering column typed
PartitionerDefinedOrder, whose toJSONString always threw.

This applies the lightweight fix agreed on the ticket for the older
branches: print the failing clustering key as raw hex bytes instead of
throwing, matching the reporter's reference patches (#2167 / #2168) and
following the approach from CASSANDRA-17698. The full type-threading
rework from 17698 is a format-level change and is already applied on 5.0
and later, so this change targets 4.0 (and forward to 4.1).

Testing:

  • New unit test asserting PartitionerDefinedOrder.toJSONString returns
    the hex string instead of throwing.
  • New integration test that dumps a secondary-index sstable and asserts
    the dump completes with valid JSON and hex-encoded clustering values.
  • Both tests confirmed to fail without the fix and pass with it.
  • Existing SSTableExportTest suite passes, no regressions.

sstabledump threw UnsupportedOperationException when dumping a secondary-index sstable, because PartitionerDefinedOrder.toJSONString always threw. Print the clustering key as raw hex bytes instead, following the approach in CASSANDRA-17698.

patch by Lakshay Madan Gopal; reviewed by TBD for CASSANDRA-18254
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.

1 participant