[
https://issues.apache.org/jira/browse/CASSANDRA-21462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jon Haddad updated CASSANDRA-21462:
-----------------------------------
Test and Documentation Plan:
This test suite covers table-type variety in three different ways:
1. Deterministic/hand-written scenarios (BasicDifferentialCompactionTest,
EdgeCaseDifferentialCompactionTest, DroppedColumnDifferentialCompactionTest,
PurgeBoundaryDifferentialCompactionTest,
MaterializedViewDifferentialCompactionTest,
AccordTableDifferentialCompactionTest, CursorSupportMatrixTest,
BigVolumeDifferentialCompactionTest, LargePartitionDifferentialCompactionTest,
etc.) — each writes a specific fixed CQL schema by hand, targeting one exact
edge case (e.g. 71-column tables at the subset-encoding boundary, dropped
columns, MV base/view tables, accord-enabled tables, 2GiB partitions).
2. QuickTheories (RandomDifferentialCompactionTest) — generates a random
schema every run: composite partition keys (1-2 cols), 0-3 clustering columns,
1-5 regular columns, 0-2 static columns, random column types (including
nested/UDT types up to depth 2), all via
TableMetadataBuilder/AbstractTypeGenerators. It filters out anything
CursorCompactor.unsupportedMetadata() would reject (the same gate production
uses), so it only ever generates schemas the cursor path is actually supposed
to handle. On top of that random schema it then runs a random workload
(inserts, updates, TTLs, same-timestamp collisions, row/range/partition/cell
deletes, ~12% nulls) across 2-4 flushed sstables. Everything is seeded.
-Dcassandra.test.differential.seed=N reproduces an exact failure.
3. Harry (HarryDifferentialCompactionTest) — the opposite emphasis: a single
fixed, hand-specified schema (2 partition cols, 2 clustering cols with one
reversed, 5 regular cols, 2 static cols, simple types only but drives a deep,
randomized operation history via Harry's HistoryBuilder DSL: interleaved
inserts, row deletes, clustering-range deletes, random column deletes, and
partition deletes across multiple flush rounds. That history is then replayed
as plain CQL (CQLTesterVisitExecutor) so it flows through both compaction
paths. Harry's value here isn't schema diversity — it's generating complex,
deeply overlapping tombstone/overwrite sequences that are hard to hand-write.
QuickTheories stresses schema shape diversity with a moderate workload; Harry
stresses operation-history complexity on one schema shape; the hand-written
tests pin exact known edge cases neither generator reliably hits.
Status: Patch Available (was: Open)
> Add byte for byte test harness to detect and resolve cursor deviations from
> iterator path
> -----------------------------------------------------------------------------------------
>
> Key: CASSANDRA-21462
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21462
> Project: Apache Cassandra
> Issue Type: Sub-task
> Components: Local/Compaction
> Reporter: Jon Haddad
> Assignee: Jon Haddad
> Priority: High
> Fix For: 6.0
>
>
> This issue addresses various deviations and inconsistencies with the cursor
> path by introducing tests that verify both the old iterator path and the new
> cursor path generate the same outputs given the same inputs. It also fixes
> various issues found in the process of creating this test system that
> resulted in corruption or incorrect values being carried into the resulting
> SSTable.
> It adds a test that uses the JVM's internal memory tracking to assert that we
> do NOT do unnecessary allocations in the cursor path that should guard
> against future regressions, and fixes an unnecessary enum allocation.
> It does NOT add support for BTI, multi-cell columns, counters, etc.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]