Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. iterate all dirs in "log.dirs" config one by one
    1. find out the topic partition log folder under the dir
    2. Iterate all the topic partition log folders and add them as jobs to thread pool with the "num.recovery.threads.per.data.dir" config number of threads
      1. load all the segments under log folder, suppose there are 10 segments
      2. filter out the segments after "recovery checkpoint", suppose there are 5 segments needed to be recovered
      3. recover the 5 segments, one by one
        1. iterate all the record batches inside the segment , and
        2. validate all the batches
        3. and rebuilt the indexes.

As we can imagine, if the broker stores a lot of logs, the log recovery process might take hours or days for the log recovery.

...