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