Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp: fix missing key names when query contains GROUP BY #8028

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

koleini
Copy link
Collaborator

@koleini koleini commented Oct 12, 2023

Key names are missing from the output record for the keys inside GROUP BY statement.

Fixes #7459

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • [] Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found
# valgrind --leak-check=full ./bin/fluent-bit -c ../conf/bug
==98401== Memcheck, a memory error detector
==98401== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==98401== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==98401== Command: ./bin/fluent-bit -c ../conf/bug
==98401== 
Fluent Bit v2.2.0
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2023/10/12 03:39:28] [ info] [fluent bit] version=2.2.0, commit=da569ea7d0, pid=98401
[2023/10/12 03:39:28] [ info] [storage] ver=1.5.1, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2023/10/12 03:39:28] [ info] [cmetrics] version=0.6.3
[2023/10/12 03:39:28] [ info] [output:stdout:stdout.0] worker #0 started
[2023/10/12 03:39:28] [ info] [ctraces ] version=0.3.1
[2023/10/12 03:39:28] [ info] [input:tail:tail.0] initializing
[2023/10/12 03:39:28] [ info] [input:tail:tail.0] storage_strategy='memory' (memory only)
[2023/10/12 03:39:28] [ info] [input:stream_processor:agg.logs] initializing
[2023/10/12 03:39:28] [ info] [input:stream_processor:agg.logs] storage_strategy=(null)
[2023/10/12 03:39:28] [ info] [sp] stream processor started
[2023/10/12 03:39:28] [ info] [sp] registered task: agg_stream
[2023/10/12 03:39:28] [ info] [input:tail:tail.0] inotify_fs_add(): inode=3547685 watch_fd=1 name=/var/log/bug
[0] logs.acc: [[1697081971.254292876, {}], {"server"=>"stage01", "host"=>"host1.com", "size_sent"=>"1", "body_size"=>"9"}]
[1] logs.acc: [[1697081971.747697882, {}], {"server"=>"stage01", "host"=>"host1.com", "size_sent"=>"1", "body_size"=>"8"}]
[0] logs.acc: [[1697081972.251094097, {}], {"server"=>"stage01", "host"=>"host1.com", "size_sent"=>"1", "body_size"=>"7"}]
[0] agg.logs: [[1697081971.902873596, {}], {"server"=>"stage01", "host"=>"host1.com", "SUM(size_sent)"=>2}]
[0] agg.logs: [[1697081972.906615055, {}], {"server"=>"stage01", "host"=>"host1.com", "SUM(size_sent)"=>1}]
^C[2023/10/12 03:39:40] [engine] caught signal (SIGINT)
[2023/10/12 03:39:40] [ warn] [engine] service will shutdown in max 5 seconds
[2023/10/12 03:39:40] [ info] [input] pausing tail.0
[2023/10/12 03:39:40] [ info] [input] pausing agg.logs
[2023/10/12 03:39:40] [ info] [engine] service has stopped (0 pending tasks)
[2023/10/12 03:39:40] [ info] [input] pausing tail.0
[2023/10/12 03:39:40] [ info] [input] pausing agg.logs
[2023/10/12 03:39:40] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
==98401== 
==98401== HEAP SUMMARY:
==98401==     in use at exit: 0 bytes in 0 blocks
==98401==   total heap usage: 5,091 allocs, 5,091 frees, 2,695,507 bytes allocated
==98401== 
==98401== All heap blocks were freed -- no leaks are possible
==98401== 
==98401== For lists of detected and suppressed errors, rerun with: -s
==98401== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@koleini koleini temporarily deployed to pr October 12, 2023 03:42 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 12, 2023 03:42 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 12, 2023 03:42 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 12, 2023 04:09 — with GitHub Actions Inactive
@edsiper
Copy link
Member

edsiper commented Oct 13, 2023

@koleini welcome back!

please sign off your commits here to avoid the DCO error from github. thank you

Signed-off-by: Masoud Koleini <masoud.koleini@arm.com>
@koleini koleini temporarily deployed to pr October 13, 2023 21:32 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 13, 2023 21:32 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 13, 2023 21:33 — with GitHub Actions Inactive
@koleini koleini temporarily deployed to pr October 13, 2023 22:01 — with GitHub Actions Inactive
@edsiper edsiper merged commit ca37e69 into fluent:master Oct 17, 2023
40 of 42 checks passed
@edsiper edsiper added this to the Fluent Bit v2.2.0 milestone Oct 17, 2023
edsiper pushed a commit that referenced this pull request Oct 17, 2023
Signed-off-by: Masoud Koleini <masoud.koleini@arm.com>
edsiper pushed a commit that referenced this pull request Oct 19, 2023
Signed-off-by: Masoud Koleini <masoud.koleini@arm.com>
edsiper pushed a commit that referenced this pull request Oct 19, 2023
Signed-off-by: Masoud Koleini <masoud.koleini@arm.com>
leonardo-albertovich pushed a commit that referenced this pull request Nov 3, 2023
Signed-off-by: Masoud Koleini <masoud.koleini@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fluent Bit stream processor returning empty Keys after processing a message
2 participants