ninsmiracle commented on PR #2068: URL: https://github.com/apache/incubator-pegasus/pull/2068#issuecomment-2217508361
Here are some picture can make this problem clearly: - Firstly, we get `_current` plog file in `find_log_file_to_start`  This process is shown in the schematic diagram:  This time, `current` will be set to plog file 1. - Then , in plog GC logic `mutation_log::garbage_collection`  Traverse from new to old, find a file whose max_decree is less than cleanable, delete this plog file and all previous files.  In extreme cases, cleanable is `_start_decree - 1` (it can never be greater than start_decree). So no matter what, when `_current` is specified as 1, file 2 will not be judged to need GC. (So,`switch_to_next_log_file` opens the potential file 2 in the figure above, and there will be no concurrency issues.) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
