Skip to content

Commit

Permalink
[greyhound] parallel consumer - improve visibility (#36346)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 8f75ec7018fc2b8723e22f70b42c1bf7f8404b99
  • Loading branch information
ben-wattelman authored and wix-oss committed Sep 3, 2023
1 parent e2fdcb5 commit d8420ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ object EventLoop {
val offsetsAndMetadataToCommit = OffsetsAndGaps.toOffsetsAndMetadata(committable)
consumer
.commitWithMetadata(offsetsAndMetadataToCommit)
.tap(_ => ZIO.when(offsetsAndMetadataToCommit.nonEmpty)(report(CommittedOffsetsAndMetadata(offsetsAndMetadataToCommit))))
.tap(_ => ZIO.when(offsetsAndMetadataToCommit.nonEmpty)(report(CommittedOffsetsAndGaps(committable))))
.catchAll { t =>
report(FailedToCommitOffsetsAndMetadata(t, offsetsAndMetadataToCommit)) *> offsetsAndGaps.setCommittable(committable)
}
Expand Down Expand Up @@ -480,7 +480,7 @@ object EventLoopMetric {
attributes: Map[String, String]
) extends EventLoopMetric

case class CommittedOffsetsAndMetadata(offsetsAndMetadata: Map[TopicPartition, OffsetAndMetadata]) extends EventLoopMetric
case class CommittedOffsetsAndGaps(offsetsAndGaps: Map[TopicPartition, OffsetAndGaps]) extends EventLoopMetric

case class FailedToCommitOffsetsAndMetadata(t: Throwable, offsetsAndMetadata: Map[TopicPartition, OffsetAndMetadata])
extends EventLoopMetric
Expand Down

0 comments on commit d8420ab

Please sign in to comment.