lucasbru opened a new pull request, #24256:
URL: https://github.com/apache/kafka/pull/24256

   The changelog reader periodically refreshes the limit offset of standby
   tasks whose changelog is a source topic, by looking up the committed
   offsets of those changelogs. It looked them up for all such changelogs,
   including those of paused tasks, which the state updater does not pass to
   restore(). When the lookup failed, the reader started the task timeout of
   the task of each looked-up changelog, and threw a NullPointerException
   for the missing task of a paused one, which killed the state updater
   thread.
   
   The reader now only refreshes the limit offsets of changelogs of tasks it
   restores. A paused task is not restored, so its limit offset is not
   needed until it is resumed. Starting the task timeout after a failed
   lookup also skips a changelog whose task is not given, like clearing the
   task timeout after a successful lookup already did, so the same mistake
   in another caller does not kill the state updater thread either.
   
   A new test in StoreChangelogReaderTest pauses a standby task while
   records beyond its limit offset are buffered, lets the lookup fail, and
   checks that no lookup is made for the paused changelog and that the limit
   offset is refreshed once the task is resumed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to