Skip to content

Enforce enforceConsumptionInOrder for partial upsert and dedup tables#17819

Open
KKcorps wants to merge 1 commit intoapache:masterfrom
KKcorps:partial_upsert_order_patch
Open

Enforce enforceConsumptionInOrder for partial upsert and dedup tables#17819
KKcorps wants to merge 1 commit intoapache:masterfrom
KKcorps:partial_upsert_order_patch

Conversation

@KKcorps
Copy link
Contributor

@KKcorps KKcorps commented Mar 5, 2026

Summary

  • Add validation in TableConfigUtils.validateUpsertAndDedupConfig() to throw an error if enforceConsumptionInOrder is not enabled for partial upsert or dedup tables during table creation or update.
  • Partial upsert and dedup tables require ordered consumption to maintain correctness. This change makes that requirement explicit at config validation time rather than allowing misconfigured tables to be created.

Changes

  • TableConfigUtils.java: Added a Preconditions.checkState that verifies StreamIngestionConfig.isEnforceConsumptionInOrder() is true when the table mode is PARTIAL upsert or dedup is enabled.
  • TableConfigUtilsTest.java: Added two new test methods (testValidateEnforceConsumptionInOrderForPartialUpsert, testValidateEnforceConsumptionInOrderForDedup) and updated existing dedup tests to include the required enforceConsumptionInOrder setting.

Test plan

  • New unit tests for partial upsert without flag (fails), with flag (passes), and full upsert without flag (passes)
  • New unit tests for dedup without flag (fails) and with flag (passes)
  • All 50 existing TableConfigUtilsTest tests pass

🤖 Generated with Claude Code

Add validation in TableConfigUtils.validateUpsertAndDedupConfig() to
throw an error if enforceConsumptionInOrder is not enabled for partial
upsert or dedup tables during table creation or update.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KKcorps KKcorps added backward-incompat Referenced by PRs that introduce or fix backward compat issues real-time labels Mar 5, 2026
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
10467 4 10463 58
View the top 3 failed test(s) by shortest run time
org.apache.pinot.integration.tests.CommitTimeCompactionIntegrationTest::testCommitTimeCompactionWithPartialUpsertMode
Stack Traces | 1.65s run time
org.apache.pinot.common.exception.HttpErrorStatusException: Got error status code: 400 (Bad Request) with reason: "enforceConsumptionInOrder must be enabled for partial upsert tables" while sending request: /tables to controller: runnervm0kj6c.z4xzv4jlyv2effazjvmryp4z0b.phxx.internal.cloudapp.net, version: 1.5.0-SNAPSHOT-4cc2a473c4332687ce2e5c7ac6ad44fd6998a141
org.apache.pinot.integration.tests.UpsertTableIntegrationTest::testDeleteWithPartialUpsert
Stack Traces | 1.78s run time
org.apache.pinot.common.exception.HttpErrorStatusException: Got error status code: 400 (Bad Request) with reason: "enforceConsumptionInOrder must be enabled for partial upsert tables" while sending request: /tables to controller: runnervm0kj6c.blvezttv0b3ejdl4gomqurzhhe.cx.internal.cloudapp.net, version: 1.5.0-SNAPSHOT-4cc2a473c4332687ce2e5c7ac6ad44fd6998a141
org.apache.pinot.integration.tests.PartialUpsertTableRebalanceIntegrationTest::setUp
Stack Traces | 22s run time
org.apache.pinot.common.exception.HttpErrorStatusException: Got error status code: 400 (Bad Request) with reason: "enforceConsumptionInOrder must be enabled for partial upsert tables" while sending request: /tables to controller: runnervm0kj6c.blvezttv0b3ejdl4gomqurzhhe.cx.internal.cloudapp.net, version: 1.5.0-SNAPSHOT-4cc2a473c4332687ce2e5c7ac6ad44fd6998a141
View the full list of 1 ❄️ flaky test(s)
org.apache.pinot.integration.tests.PauselessRealtimeIngestionWithDedupIntegrationTest::setUp

Flake rate in main: 100.00% (Passed 0 times, Failed 32 times)

Stack Traces | 26.4s run time
Failed to load 5 documents; current count=4 for table=DedupTableWithReplicas_REALTIME expected [5] but found [4]

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backward-incompat Referenced by PRs that introduce or fix backward compat issues real-time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants