journal: do not rotate journal when MaxRetentionSec= is set

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.
This commit is contained in:
Yu Watanabe
2024-08-05 15:33:32 +09:00
parent 2d00f4c306
commit b63c18db03
+1 -2
View 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;
}