test(inkless:consolidation): add read-from-remote system tests, harness support#654
Draft
viktorsomogyi wants to merge 3 commits into
Draft
Conversation
7bd6055 to
055dd90
Compare
3437d4c to
986aaa3
Compare
055dd90 to
6451701
Compare
d29c23c to
17d63d7
Compare
6451701 to
6e205fa
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Inkless consolidation system tests that validate read-from-remote behavior after WAL pruning and complete local log loss across multiple consolidation entry paths, plus KafkaService harness support for atomic multi-config topic alters required by some transitions.
Changes:
- Add born-consolidated durability system test verifying earliest/first-fetch-from-0 after wipe+restart.
- Add switched classic→diskless consolidated durability system test covering classic-epoch boundary reads after prune + wipe.
- Add upgrade test covering untiered-diskless → consolidation-enabled transition and end-to-end readability.
- Extend
KafkaServicewithalter_topic_configs()to apply multiple topic configs in onekafka-configs --add-configinvocation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/kafkatest/tests/inkless/consolidation_switched_read_from_remote_after_prune_test.py | New switched-topic durability test; includes offset/read helpers using console-consumer. |
| tests/kafkatest/tests/inkless/consolidation_read_from_remote_after_prune_test.py | New born-consolidated durability test verifying earliest and fetch-from-0 after wipe+restart. |
| tests/kafkatest/tests/inkless/consolidation_enable_on_untiered_diskless_test.py | New upgrade test for enabling consolidation on an existing untiered diskless topic. |
| tests/kafkatest/services/kafka/kafka.py | Adds atomic multi-config topic alter helper (alter_topic_configs). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6e205fa to
253d3c7
Compare
1395419 to
b31f319
Compare
d78b81f to
643ff3d
Compare
643ff3d to
24eea0d
Compare
24eea0d to
380bfa8
Compare
380bfa8 to
8a416c4
Compare
02de918 to
e2756bf
Compare
b31f319 to
5f769d0
Compare
e2756bf to
d6aaa2d
Compare
5f769d0 to
ec364e5
Compare
d6aaa2d to
1353235
Compare
Base automatically changed from
svv/ts-unification-systest-test1
to
svv/ts-unification-recover-leader
June 29, 2026 12:46
c551884 to
89f76e2
Compare
1353235 to
7ef5195
Compare
21101ef to
162024b
Compare
7ef5195 to
a5d0879
Compare
| and locate the remote segments. ``allow_fail``: a data dir may not hold a | ||
| replica of this partition.""" | ||
| for data_dir in (self.kafka.DATA_LOG_DIR_1, self.kafka.DATA_LOG_DIR_2): | ||
| node.account.ssh("rm -rf -- %s/%s-*" % (data_dir, topic), allow_fail=True) |
| if len(parts) == 3 and parts[0] == topic and parts[1] == str(partition): | ||
| return int(parts[2]) | ||
| except Exception as e: # noqa: BLE001 - best effort; tool may not be ready | ||
| self.logger.warn("Failed to read offset (time=%s) for %s-%d: %s" |
| first_offset = int(match.group(1)) | ||
| num_read += 1 | ||
| except Exception as e: # noqa: BLE001 - best effort; tool may time out | ||
| self.logger.warn("Failed to read from %s-%d at offset %d: %s" |
| if match: | ||
| records.append((int(match.group(1)), int(match.group(2)))) | ||
| except Exception as e: # noqa: BLE001 - best effort; tool may time out | ||
| self.logger.warn("Failed to read records from %s-%d at offset %d: %s" |
…ne system test Add ConsolidationPipelineTest for a born-consolidated topic, asserting the full WAL -> local log -> remote pipeline: consolidation JMX gauges are exported, the MinIO tiered-storage prefix grows, the Postgres control plane prunes the WAL, and every acked record is still consumable. Consolidation is enabled per-test via KafkaService(consolidation=True) (also flips the isolated controller), so it runs in the unified inkless ducktape suite without a run-wide --globals flag. JmxTool runs on brokers only since the controller never exposes the consolidation MBeans. Add ConsolidationVerifier helper (JMX gauges, MinIO via mc, control plane via psql) and install mc + postgresql-client in the ducker image.
162024b to
3b59a48
Compare
a5d0879 to
9b7ae16
Compare
…the seal maybeReconcileSwitchedLeader fenced a switched leader offline whenever its LEO fell below the committed seal. It runs during applyLocalLeadersDelta, before the ConsolidationReconciler, so the wiped-leader recovery from #673 never ran. The reconciler only sees online partitions, and a wiped consolidating leader (LEO 0 < seal) was offline before it could rebuild. Every fetch and offset request then failed with KAFKA_STORAGE_ERROR. For a consolidating diskless topic with remote storage enabled, [0, seal) is in the remote tier and can be rebuilt, so leave the partition online and let the reconciler arm consolidation at the current LEO. Non-consolidating topics still fence, since their classic prefix has no remote copy and LEO < seal is unrecoverable corruption. Co-authored-by: Cursor <cursoragent@cursor.com>
…ss support System tests covering the read-from-remote-after-prune path for all three consolidation entry points: - born-consolidated, - classic-to-consolidated (switched), and - untiered-diskless -> consolidated (upgrade). Includes the KafkaService harness support the tests rely on (atomic alter_topic_configs) and a shared ConsolidationVerifier helper for the JMX/object-store/control-plane assertions and the common topic, switch, offset and read helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
9b7ae16 to
0011cb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
System tests covering the read-from-remote-after-prune path for all three consolidation entry points:
Includes the KafkaService harness support the tests rely on (atomic alter_topic_configs, per-service consolidation toggle).