Skip to content

test(inkless:consolidation): DeleteRecords across tiers e2e test [KC-332]#712

Draft
viktorsomogyi wants to merge 2 commits into
svv/ts-unification-reclaim-floorfrom
svv/ts-unification-delete-records-e2e
Draft

test(inkless:consolidation): DeleteRecords across tiers e2e test [KC-332]#712
viktorsomogyi wants to merge 2 commits into
svv/ts-unification-reclaim-floorfrom
svv/ts-unification-delete-records-e2e

Conversation

@viktorsomogyi

Copy link
Copy Markdown
Contributor

Adds consolidation_delete_records_across_tiers_test.py, the end-to-end regression for Problem A and Problem B on a switched consolidating topic: after DeleteRecords the earliest offset advances off 0, is identical on every broker, settles exactly at the delete boundary, and the surviving classic prefix [delete_before, seal) reads back contiguous. Also covers leader-failover metadata-propagation timing and born-consolidated topics.

Adds the verifier helpers these need: delete_records, per-broker earliest_on_each_broker / wait_for_consistent_earliest_across_brokers, create_consolidated_topic, _broker_bootstrap, offset_at bootstrap pinning, and wait_for_tiered_count_stable (a settled pre-reclaim tiered-count peak).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end ducktape regression suite validating DeleteRecords semantics for Inkless consolidating topics across classic+remote tiers, including broker-to-broker earliest-offset consistency and post-failover safety.

Changes:

  • Add a new e2e test covering cross-tier DeleteRecords on switched (hybrid) consolidating topics, including leader failover and surviving-prefix readback verification.
  • Add verifier helpers to support the test: per-broker bootstrap pinning, per-broker earliest queries + convergence waiting, DeleteRecords wrapper, born-consolidated topic creation, and a “tiered object count stabilized” waiter.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/kafkatest/tests/inkless/consolidation_delete_records_across_tiers_test.py New e2e test suite for cross-tier DeleteRecords correctness on switched and born-consolidated topics, including failover coverage.
tests/kafkatest/services/inkless/consolidation_verifier.py Adds helper APIs used by the new test (delete-records runner, per-broker earliest checks, born-consolidated topic creation, tiered-count stabilization waiter).

Comment on lines +266 to +272
state = {"last": -1, "stable": 0, "value": 0}

def check():
cur = self.tiered_object_count()
state["stable"] = state["stable"] + 1 if cur == state["last"] else 0
state["last"] = cur
state["value"] = cur
values = set(per_broker.values())
agreed = len(values) == 1 and all(v > 0 for v in values)
cur = next(iter(values)) if agreed else None
state["stable"] = state["stable"] + 1 if (agreed and cur == state["last"]) else 0
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-reclaim-floor branch 2 times, most recently from 654af13 to 2336424 Compare July 22, 2026 13:48
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from 98c8387 to cdfdd1c Compare July 22, 2026 13:52
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-reclaim-floor branch 2 times, most recently from ea588ff to 66ddbb7 Compare July 23, 2026 07:59
@viktorsomogyi
viktorsomogyi changed the base branch from svv/ts-unification-reclaim-floor to main July 23, 2026 08:32
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch 2 times, most recently from 3d4a2a3 to d52365c Compare July 23, 2026 10:01
@viktorsomogyi
viktorsomogyi changed the base branch from main to svv/ts-unification-reclaim-floor July 23, 2026 10:06
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-reclaim-floor branch 4 times, most recently from f6c0f80 to e3f351d Compare July 24, 2026 12:17
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from d52365c to 796731c Compare July 24, 2026 12:17
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-reclaim-floor branch from e3f351d to 5079dcd Compare July 24, 2026 13:07
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from 796731c to b17bfd0 Compare July 24, 2026 13:11
…r earliest [KC-332]

Followers keep a stale local logStartOffset (frozen at the seal) after a switch,
so an older consumer routed there could read logically-deleted records. Consult
the control-plane cross-tier earliest and reject such fetches with
OFFSET_OUT_OF_RANGE (fail-open when unavailable). Adds unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from b17bfd0 to c617830 Compare July 24, 2026 13:46
…332]

Adds consolidation_delete_records_across_tiers_test.py, the end-to-end
regression for Problem A and Problem B on a switched consolidating topic:
after DeleteRecords the earliest offset advances off 0, is identical on
every broker, settles exactly at the delete boundary, and the surviving
classic prefix [delete_before, seal) reads back contiguous. Also covers
leader-failover metadata-propagation timing and born-consolidated topics.

Adds the verifier helpers these need: delete_records, per-broker
earliest_on_each_broker / wait_for_consistent_earliest_across_brokers,
create_consolidated_topic, _broker_bootstrap, offset_at bootstrap pinning,
and wait_for_tiered_count_stable (a settled pre-reclaim tiered-count peak).

Co-authored-by: Cursor <cursoragent@cursor.com>
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from c617830 to 9bc2388 Compare July 24, 2026 14:30
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