Skip to content

PHOENIX-8074 Increase default CDC TTL_DELETE mutation batch size to 500 - #2709

Merged
virajjasani merged 1 commit into
apache:masterfrom
Divneet18:PHOENIX-8074
Nov 25, 2026
Merged

virajjasani merged 1 commit into
apache:masterfrom
Divneet18:PHOENIX-8074

Conversation

@Divneet18

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Increase the default of phoenix.cdc.ttl.mutation.batch.size (DEFAULT_CDC_TTL_MUTATION_BATCH_SIZE) from 50 to 500. This is how many TTL_DELETE CDC events a major compaction writes to the CDC index in one batch.
  • Add TableTTLIT#testCDCTTLDeleteEventsForPartiallyExpiredRows. It inserts 15,000 rows, updates 8,250 of them before they expire, and runs a major compaction once the other 6,750 rows are past TTL + max lookback. It checks that:
    • only the 8,250 updated rows are left, both in a query and in a raw scan
    • each of the 6,750 expired rows has exactly one TTL_DELETE event, and no row that was kept has one
    • each TTL_DELETE pre-image matches the values the row was inserted with
  • Fix the Javadoc of testCDCBatchMutationsForTTLExpiredRows, which said 82 rows. The test uses 182.

Why are the changes needed?

With a batch size of 50, a compaction that expires thousands of rows makes many small writes to the CDC index: 135 batches for 6,750 rows, compared with 14 batches at 500. The existing CDC TTL tests expire at most 182 rows, so none of them covered a large number of expired rows spread over many batches.

Does this PR introduce any user-facing change?

The default of phoenix.cdc.ttl.mutation.batch.size changes from 50 to 500. Clusters that set this property keep their value. The content of CDC events does not change.

How was this patch tested?

  • The new test passes for all 9 TableTTLIT parameter sets, in about 3.5 minutes in total. The test logs show Processed 6750 mutations in 14 batches for each compaction, with no retries or missed events.
  • All of TableTTLIT passes locally: 99 runs in about 17 minutes, within the 30-minute limit for NeedsOwnMiniClusterTest classes.
mvn install -DskipTests -pl phoenix-core-client,phoenix-core-server -am
mvn verify -pl phoenix-core -Dit.test=TableTTLIT -Dtest=skip -Dsurefire.failIfNoSpecifiedTests=false -Dit.failIfNoSpecifiedTests=false

Was this patch authored or co-authored using generative AI tooling?

Co-authored-by: Claude Code (Claude Opus 5.5)

🤖 Co-authored with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@virajjasani
virajjasani merged commit b3f21ac into apache:master Nov 25, 2026
12 of 13 checks passed
virajjasani pushed a commit that referenced this pull request Nov 25, 2026
…00 (#2709)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants