Conversation
When a *mirror* is scanned, the number of files removed is logged: ``` 2025/05/19 01:21:10.644 UTC [archive-4.kali.org] Requesting file list via rsync... 2025/05/19 01:22:42.670 UTC [archive-4.kali.org] Indexed 490848 files (490847 known), 3807 removed ``` However when the *source* is scanned, it's not logged: ``` 2025/05/19 00:25:22.639 UTC [source] Scanning the filesystem... 2025/05/19 00:25:58.265 UTC [source] Indexing the files... 2025/05/19 00:26:02.360 UTC [source] Scanned 490848 files ``` The number of removed files can be useful information, and it's trivial to add it to the log, so let's add it. Additionally, this commit trades the term "Scanned" for "Indexed", to align with the term that is used for the *mirror* scans (above). After this commit, the logs now look like that: ``` 2025/05/19 00:25:22.639 UTC [source] Scanning the filesystem... 2025/05/19 00:25:58.265 UTC [source] Indexing the files... 2025/05/19 00:26:02.360 UTC [source] Indexed 490848 files, 3807 removed ```
So far, when a mirror is scanned, we have two logs: when it starts, and when it ends: ``` 2025/05/19 01:21:10.644 UTC [archive-4.kali.org] Requesting file list via rsync... 2025/05/19 01:22:42.670 UTC [archive-4.kali.org] Indexed 490848 files (490847 known), 3807 removed ``` We don't have a timestamp in the middle, to indicate that the scan is finished, and we're about to commit the result to the database. Too bad, as it's sometimes useful to know how long it took for the scan, and how long it took for the commit. And as we can see, when the source is scanned, we do have this information: ``` 2025/05/19 00:25:22.639 UTC [source] Scanning the filesystem... 2025/05/19 00:25:58.265 UTC [source] Indexing the files... 2025/05/19 00:26:02.360 UTC [source] Indexed 490848 files, 3807 removed ``` So this commit aligns the logs for mirror scan with the logs for source scan: it adds this extra log before starting the commit operation. Now the logs look like that: ``` 2025/05/19 01:21:10.644 UTC [archive-4.kali.org] Requesting file list via rsync... 2025/05/19 01:22:37.927 UTC [archive-4.kali.org] Indexing the files... 2025/05/19 01:22:42.670 UTC [archive-4.kali.org] Indexed 490848 files (490847 known), 3807 removed ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.