diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-02-09 20:10:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-02-09 20:10:00 +0100 |
commit | aa9122bf3d52fb7e4e7638d1e8e3a3c5cc3c2694 (patch) | |
tree | d4be79e71cef5f4c7e3eae14adab8249f2c5f77c /src/journal | |
parent | cadc80b873794e52cb73235e8c0a03fe665d64af (diff) | |
download | systemd-aa9122bf3d52fb7e4e7638d1e8e3a3c5cc3c2694.tar.gz |
Revert "Periodically call sd_journal_process in journalctl" (#8147)
This reverts commit 992149c07e3ecfbfe4067641e92a6923e7aacda4.
https://github.com/systemd/systemd/pull/8144#issuecomment-364464627
$ (set -o pipefail; sudo ./build/journalctl --no-pager | wc -l; echo $?)
Failed to process inotify events: Bad file descriptor
1025
1
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journalctl.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 2cf35f7e66..bb9cfb6dc4 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -81,8 +81,6 @@ #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) -#define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ - #if HAVE_PCRE2 DEFINE_TRIVIAL_CLEANUP_FUNC(pcre2_match_data*, pcre2_match_data_free); DEFINE_TRIVIAL_CLEANUP_FUNC(pcre2_code*, pcre2_code_free); @@ -2641,32 +2639,6 @@ int main(int argc, char *argv[]) { goto finish; n_shown++; - - /* If journalctl take a long time to process messages, and - * during that time journal file rotation occurs, a journalctl - * client will keep those rotated files open until it calls - * sd_journal_process(), which typically happens as a result - * of calling sd_journal_wait() below in the "following" case. - * By periodically calling sd_journal_process() during the - * processing loop we shrink the window of time a client - * instance has open file descriptors for rotated (deleted) - * journal files. - * - * FIXME: This change does not appear to solve the case of a - * "paused" output stream. If somebody is using `journalctl | less` - * and pauses the output, then without a background thread - * periodically listening for inotify delete events and cleaning - * up, journal logs will eventually stop flowing in cases where - * a journal client with enough open files causes the "free" - * disk space threshold to be crossed. - */ - if ((n_shown % PROCESS_INOTIFY_INTERVAL) == 0) { - r = sd_journal_process(j); - if (r < 0) { - log_error_errno(r, "Failed to process inotify events: %m"); - goto finish; - } - } } if (!arg_follow) { |