Skip to content

avro: Handle int64 values correctly [Backport to 4.2]#11892

Merged
cosmo0920 merged 6 commits into
4.2from
cosmo0920-handle-int64-values-correctly-in-avro-4.2
Jun 2, 2026
Merged

avro: Handle int64 values correctly [Backport to 4.2]#11892
cosmo0920 merged 6 commits into
4.2from
cosmo0920-handle-int64-values-correctly-in-avro-4.2

Conversation

@cosmo0920
Copy link
Copy Markdown
Contributor

Backporting of #11883.


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:

  • 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

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

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

Documentation

  • Documentation required for this feature

Backporting

  • 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.

cosmo0920 added 6 commits June 2, 2026 14:39
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 24037cdb-f642-4a3c-a93b-4cc7ece28c2d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-handle-int64-values-correctly-in-avro-4.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4da4a52c1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/flb_avro.c
Comment on lines +60 to +62
if (positive && u64 > INT32_MAX) {
flb_error("positive integer value exceeds Avro int range: %" PRIu64, u64);
return FLB_FALSE;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate integer conversion failures from arrays

When this new range check fires for an element inside an Avro array, msgpack2avro does not stop or preserve the failure in the array case: it appends the element, sets ret to FLB_FALSE, then continues and can overwrite ret with a later successful element. For an int array such as [2147483648, 1], flb_msgpack_to_avro can return success even though the first element could not be assigned, so the encoder may emit a record with an unset/defaulted array element instead of rejecting the invalid input.

Useful? React with 👍 / 👎.

@cosmo0920 cosmo0920 merged commit 888a41e into 4.2 Jun 2, 2026
26 checks passed
@cosmo0920 cosmo0920 deleted the cosmo0920-handle-int64-values-correctly-in-avro-4.2 branch June 2, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant