From 0730f1324d344b9535409688c01dfaad99ebd2de Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 27 Jun 2024 19:43:19 +0200 Subject: [PATCH] lib/logstorage: it is safe using `| unroll` pipe in live tailing `| unroll` pipe can make multiple copies of rows from the input row. This doesn't break live tailing, so allow `| unroll` pipe in live tailing. --- lib/logstorage/parser_test.go | 2 +- lib/logstorage/pipe_unroll.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 506fc89ede..78558e329e 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -2075,5 +2075,5 @@ func TestQueryCanLiveTail(t *testing.T) { f("* | unpack_json", true) f("* | unpack_logfmt", true) f("* | unpack_syslog", true) - f("* | unroll by (a)", false) + f("* | unroll by (a)", true) } diff --git a/lib/logstorage/pipe_unroll.go b/lib/logstorage/pipe_unroll.go index 333fcc3289..11a0125298 100644 --- a/lib/logstorage/pipe_unroll.go +++ b/lib/logstorage/pipe_unroll.go @@ -33,7 +33,7 @@ func (pu *pipeUnroll) String() string { } func (pu *pipeUnroll) canLiveTail() bool { - return false + return true } func (pu *pipeUnroll) optimize() {