]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: do not rotate journal when MaxRetentionSec= is set
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Aug 2024 05:56:11 +0000 (14:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Aug 2024 06:33:32 +0000 (15:33 +0900)
The setting is about vacuuming archived journal files. It is not
necessary to rotate the current journal. Note, journal file rotation is
controlled by MaxFileSec=.

Fixes #31315.

src/journal/journald.c

index 2f013c2ab2b2d4d04d089fca544186d891ef37eb..87ed22e7fe91c441a591a32e2914871e27dc10aa 100644 (file)
@@ -94,8 +94,7 @@ static int run(int argc, char *argv[]) {
 
                         /* The retention time is reached, so let's vacuum! */
                         if (t <= 0) {
-                                log_info("Retention time reached, rotating.");
-                                server_rotate(s);
+                                log_info("Retention time reached, vacuuming.");
                                 server_vacuum(s, /* verbose = */ false);
                                 continue;
                         }