On 8/15/21, 9:52 PM, "Bossart, Nathan" <bossa...@amazon.com> wrote: > + * Perform a full directory scan to identify the next log segment. There > + * may be one of the following scenarios which may require us to > perform a > + * full directory scan. > ... > + * - The next anticipated log segment is not available. > > I wonder if we really need to perform a directory scan in this case. > Unless there are other cases where the .ready files are created out of > order, I think this just causes an unnecessary directory scan every > time the archiver catches up.
Thinking further, I suppose this is necessary for when lastSegNo gets reset after processing an out-of-order .ready file. Nathan