]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: Drop monotonicity check when appending to journal file 2559/head
authorKlearchos Chaloulos <klearchos.chaloulos@nokia.com>
Tue, 9 Feb 2016 10:14:54 +0000 (12:14 +0200)
committerKlearchos Chaloulos <klearchos.chaloulos@nokia.com>
Tue, 9 Feb 2016 10:14:54 +0000 (12:14 +0200)
Remove the check that triggers rotation of the journal file when the arriving log entry had a monotonic timestamp smaller that the previous log entry. This check causes unnecessary rotations when journal-remote was receiving from multiple senders, therefore monotonicity can not be guaranteed. Also, it does not offer any useful functionality for systemd-journald.

src/journal/journal-file.c

index 3d87e25724bd247706827b5b64d892048c23eed8..3fcec88e945b5a790ec8c828a4c6ec3b83dced17 100644 (file)
@@ -1533,10 +1533,6 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
                 ts = &_ts;
         }
 
-        if (f->tail_entry_monotonic_valid &&
-            ts->monotonic < le64toh(f->header->tail_entry_monotonic))
-                return -EINVAL;
-
 #ifdef HAVE_GCRYPT
         r = journal_file_maybe_append_tag(f, ts->realtime);
         if (r < 0)