Skip to content

Commit

Permalink
run update-codegen
Browse files Browse the repository at this point in the history
Signed-off-by: debasishbsws <debasishbsws.dev@gmail.com>
  • Loading branch information
debasishbsws committed Aug 22, 2023
1 parent 0bf6b9b commit 3b92a3b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,17 @@ private void poll() {
if (this.isPollInFlight.compareAndSet(false, true)) {
logger.debug("Polling for records {}", getConsumerVerticleContext().getLoggingKeyValue());

this.consumer.poll(POLLING_TIMEOUT).onSuccess(records -> vertx.runOnContext(v -> this.recordsHandler(records))).onFailure(t -> {
if (this.closed.get()) {
// The failure might have been caused by stopping the consumer, so we just ignore it
return;
}
isPollInFlight.set(false);
exceptionHandler(t);
});
this.consumer
.poll(POLLING_TIMEOUT)
.onSuccess(records -> vertx.runOnContext(v -> this.recordsHandler(records)))
.onFailure(t -> {
if (this.closed.get()) {
// The failure might have been caused by stopping the consumer, so we just ignore it
return;

Check warning on line 148 in data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/OrderedConsumerVerticle.java

View check run for this annotation

Codecov / codecov/patch

data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/OrderedConsumerVerticle.java#L148

Added line #L148 was not covered by tests
}
isPollInFlight.set(false);
exceptionHandler(t);
});

Check warning on line 152 in data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/OrderedConsumerVerticle.java

View check run for this annotation

Codecov / codecov/patch

data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/OrderedConsumerVerticle.java#L150-L152

Added lines #L150 - L152 were not covered by tests
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@ private synchronized void poll() {
return;
}
if (this.isPollInFlight.compareAndSet(false, true)) {
this.consumer.poll(POLL_TIMEOUT).onSuccess(records -> vertx.runOnContext(v -> this.handleRecords(records))).onFailure(cause -> {
isPollInFlight.set(false);
logger.error(
"Failed to poll messages {}",
getConsumerVerticleContext().getLoggingKeyValue(),
cause);
// Wait before retrying.
vertx.setTimer(BACKOFF_DELAY_MS, t -> poll());
});
this.consumer
.poll(POLL_TIMEOUT)
.onSuccess(records -> vertx.runOnContext(v -> this.handleRecords(records)))
.onFailure(cause -> {
isPollInFlight.set(false);
logger.error(

Check warning on line 105 in data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java

View check run for this annotation

Codecov / codecov/patch

data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java#L104-L105

Added lines #L104 - L105 were not covered by tests
"Failed to poll messages {}",
getConsumerVerticleContext().getLoggingKeyValue(),

Check warning on line 107 in data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java

View check run for this annotation

Codecov / codecov/patch

data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java#L107

Added line #L107 was not covered by tests
cause);
// Wait before retrying.
vertx.setTimer(BACKOFF_DELAY_MS, t -> poll());
});

Check warning on line 111 in data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java

View check run for this annotation

Codecov / codecov/patch

data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/consumer/UnorderedConsumerVerticle.java#L110-L111

Added lines #L110 - L111 were not covered by tests
}
}

Expand Down

0 comments on commit 3b92a3b

Please sign in to comment.