923a60
From e1d77a906fef76c1c8db2132e1d3a407f913444c Mon Sep 17 00:00:00 2001
923a60
From: Klearchos Chaloulos <klearchos.chaloulos@nokia.com>
923a60
Date: Tue, 9 Feb 2016 12:14:54 +0200
923a60
Subject: [PATCH] journal: Drop monotonicity check when appending to journal
923a60
 file
923a60
923a60
Remove the check that triggers rotation of the journal file when the
923a60
arriving log entry had a monotonic timestamp smaller that the previous
923a60
log entry. This check causes unnecessary rotations when journal-remote
923a60
was receiving from multiple senders, therefore monotonicity can not be
923a60
guaranteed. Also, it does not offer any useful functionality for
923a60
systemd-journald.
923a60
923a60
Cherry-picked from: ecb6105a1bd8445a123343827d46bb527bcca92f
923a60
Related: #1318994
923a60
---
923a60
 src/journal/journal-file.c | 4 ----
923a60
 1 file changed, 4 deletions(-)
923a60
923a60
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
923a60
index 2a93460d4e..8034b771de 100644
923a60
--- a/src/journal/journal-file.c
923a60
+++ b/src/journal/journal-file.c
923a60
@@ -1419,10 +1419,6 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
923a60
                 ts = &_ts;
923a60
         }
923a60
 
923a60
-        if (f->tail_entry_monotonic_valid &&
923a60
-            ts->monotonic < le64toh(f->header->tail_entry_monotonic))
923a60
-                return -EINVAL;
923a60
-
923a60
 #ifdef HAVE_GCRYPT
923a60
         r = journal_file_maybe_append_tag(f, ts->realtime);
923a60
         if (r < 0)