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

   A standby task whose changelog is a source topic restores only up to the
   committed offset of the source topic, its limit offset. The changelog
   reader starts the limit offset at 0, to keep the standby from restoring
   until the committed offset has been looked up, and reported that 0 as the
   end offset of the changelog. While the lookup had not succeeded yet, for
   example because the first lookup failed, the task therefore reported an
   end offset of 0. Against the offset of the local state, that is a lag of
   at most 0, so the broker counted the task as caught up, and could promote
   a warm-up task before it had restored anything.
   
   The changelog reader now reports an unknown end offset for such a
   changelog until its limit offset has been looked up successfully. A
   failed lookup was only retried while records were buffered, so a standby
   of an idle source topic would have reported an unknown end offset
   forever. The reader now also retries the lookup for a changelog whose
   limit offset has not been looked up yet, once per commit interval,
   counted from the last lookup including the one that initializes the
   changelog. Since every failed retry starts or advances the task timeout,
   a standby whose lookups keep failing now fails after task.timeout.ms,
   where it previously stayed at a limit offset of 0 without ever restoring.
   
   New tests in StoreChangelogReaderTest check that the end offset is
   unknown at registration and after a failed lookup, that the lookup is
   retried only after a commit interval also when nothing is buffered, and
   that a source partition without a committed offset reports an end offset
   of 0.
   


-- 
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