zalando / nakadi

A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
https://nakadi.io
MIT License
952 stars 292 forks source link

fix log message for commits in the future #1472

Closed ePaul closed 1 year ago

ePaul commented 1 year ago

One-line summary

Extend log message to include the offset just compared.

Description

@tanvir002700 noted in an internal chat a situation (running Nakadi locally) where this error message is raised. When trying to look into it, I noticed that the offset printed as part of the error message is not too helpful: Nakadi is comparing offset and sentOffset, but was logging sentOffset and commitOffset.

This PR adds offset to the log message, hopefully making it easier to debug problems when this occurs.

Review

Deployment Notes

These should highlight any db migrations, feature toggles, etc.

ePaul commented 1 year ago

I didn't specifically check whether any tests are affected – looking for "will skip sending obsolete data" didn't show other locations than the one modified here, so I suppose there are no tests for this. Same for documentation.

antban commented 1 year ago

:+1:

ePaul commented 1 year ago

:+1:

a1exsh commented 1 year ago

Hm: [ant:checkstyle] [ERROR] /workspace/api-consumption/src/main/java/org/zalando/nakadi/service/subscription/state/PartitionData.java:189: Line is longer than 120 characters (found 133). [LineLength]

Wonder how it passed the build earlier? :)