Skip to content

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

Open
viktorsomogyi wants to merge 1 commit into
mainfrom
svv/ts-unification-delete-records-e2e
Open

test(inkless:consolidation): DeleteRecords across tiers e2e test [KC-332]#712
viktorsomogyi wants to merge 1 commit into
mainfrom
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 4 times, most recently from 9bc2388 to a25c580 Compare July 27, 2026 10:38
@viktorsomogyi
viktorsomogyi changed the base branch from svv/ts-unification-reclaim-floor to svv/ts-unification-follower-reads July 27, 2026 10:39
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from a25c580 to c368943 Compare July 27, 2026 12:28
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-follower-reads branch from dda940f to 96ef5b2 Compare July 28, 2026 08:52
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-delete-records-e2e branch from c368943 to 0878b80 Compare July 28, 2026 08:57
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-follower-reads branch 3 times, most recently from 762c659 to 692f42e Compare July 28, 2026 12:51
@viktorsomogyi
viktorsomogyi force-pushed the svv/ts-unification-follower-reads branch from 692f42e to ed0554d Compare July 28, 2026 13:46
Base automatically changed from svv/ts-unification-follower-reads to main July 28, 2026 15:07
…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 0878b80 to 3f7ea8d Compare July 29, 2026 07:56
@viktorsomogyi
viktorsomogyi marked this pull request as ready for review July 29, 2026 07:57
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