Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,10 @@ void atLeastOnceSurvivesHardCrashRestart() throws Exception {
);
final var observedByABeforeCrash = Set.copyOf(observedA);

// CRASH: stop the manager (no further commit; markOffsetProcessed becomes a no-op) and abandon
// A's consumer thread without a graceful drain — no shutdownGracefully(). On interrupt A's loop
// closes its Kafka consumer in its finally, which leaves the group promptly; B then inherits
// the
// partition and resumes from the manually-committed prefix.
// CRASH: stop the manager (no further commit; markOffsetProcessed becomes a no-op) and
// abandon A's consumer thread without a graceful drain (no shutdownGracefully()). On
// interrupt, A's loop closes its Kafka consumer in the finally, which leaves the group
// promptly; B then inherits the partition and resumes from the manually-committed prefix.
offsetManagerA.get().stop();
threadA.interrupt();

Expand Down Expand Up @@ -230,9 +229,9 @@ void atLeastOnceSurvivesHardCrashRestart() throws Exception {
final var tp = entry.getKey();
final var logEnd = entry.getValue();
final var committedMeta = committedFinal.get(tp);
// A missing commit is an acceptable uncommitted tail (reprocessed on a later restart);
// no-loss
// above already covers it. Only bound-check partitions that actually committed.
// A missing commit is an acceptable uncommitted tail (reprocessed on a later
// restart); no-loss above already covers it. Only bound-check partitions that
// actually committed.
if (committedMeta == null) {
continue;
}
Expand Down Expand Up @@ -312,13 +311,10 @@ private KPipeConsumer<byte[]> buildConsumerWithManagedOffsets(
.withProperties(consumerProperties(groupId))
.withTopic(topic)
// SEQUENTIAL on purpose: in-order processing means the committed prefix is a clean
// contiguous
// range, and combined with the small max.poll.records (see consumerProperties) the
// consumer
// drains the command queue between small batches so the manual commit lands as a
// bounded
// prefix. At-least-once is mode-independent; the PARALLEL path is covered by the offset
// property/stress/jcstress suites.
// contiguous range, and combined with the small max.poll.records (see
// consumerProperties) the consumer drains the command queue between small batches so
// the manual commit lands as a bounded prefix. At-least-once is mode-independent; the
// PARALLEL path is covered by the offset property/stress/jcstress suites.
.withProcessingMode(ProcessingMode.SEQUENTIAL)
.withPipeline(
TestPipelines.sideEffect(value -> {
Expand Down
Loading