Divneet18 opened a new pull request, #2709:
URL: https://github.com/apache/phoenix/pull/2709
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://phoenix.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]
PHOENIX-XXXX Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes, and
prefix it with the JIRA id, e.g. 'PHOENIX-XXXX Your PR title ...'.
6. If possible, provide a concise example to reproduce the issue for a
faster review.
-->
### 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](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]