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

fix: Update FlushBytes parsing/defaults #13576

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Jul 4, 2024

Motivation/summary

Updates the FlushBytes setting to default to 1 mib and only override to 24kb if the user has explicitly set it to 24kb.

Checklist

How to test these changes

  1. Spin up an APM Server and send data to it (without this fix).
  2. Look at the request length for Elasticsearch requests and verify they're smaller than 50kb and very close to 24kb (26kb)
  3. Now start apm sever with the code in this PR and send data to it
  4. Verify that the flush size is significantly higher than before and if you sent enough data it should be ~1MB.

Related issues

Fixes #13024

Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes elastic#13024

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
@marclop marclop added the bug label Jul 4, 2024
Copy link
Contributor

mergify bot commented Jul 4, 2024

This pull request does not have a backport label. Could you fix it @marclop? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Jul 4, 2024
@marclop marclop added backport-8.14 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Jul 4, 2024
@marclop
Copy link
Contributor Author

marclop commented Jul 4, 2024

I committed the code without setting the default value for FlushBytes and the tests fail (so we can verify this bug fix) https://github.com/elastic/apm-server/actions/runs/9789313060/job/27028818438?pr=13576#step:4:173. I'll commit the fix in the next commit.

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
@marclop marclop marked this pull request as ready for review July 4, 2024 06:47
@marclop marclop requested a review from a team as a code owner July 4, 2024 06:47
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
@StephanErb
Copy link

Thank you! In case there is another 8.14 release, would it be possible to get this backportet?

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

😱 good find @marclop!

@marclop
Copy link
Contributor Author

marclop commented Jul 4, 2024

We're still missing the backport-8.15 label, I'll re-tag the PR once it's created.

@marclop marclop merged commit a453a88 into elastic:main Jul 4, 2024
14 checks passed
@marclop marclop deleted the b/fix-FlushBytes-24kb branch July 4, 2024 07:15
mergify bot pushed a commit that referenced this pull request Jul 4, 2024
Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes #13024
---------

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
(cherry picked from commit a453a88)

# Conflicts:
#	changelogs/head.asciidoc
#	internal/beater/beater.go
@inge4pres
Copy link
Contributor

great catch @marclop 👏🏼

@carsonip
Copy link
Member

carsonip commented Jul 4, 2024

#12604 was the PR that introduced the regression

@v1v
Copy link
Member

v1v commented Jul 4, 2024

We're still missing the backport-8.15 label, I'll re-tag the PR once it's created.

Let me solve this

@v1v v1v added the backport-8.15 Automated backport with mergify label Jul 4, 2024
@marclop marclop added backport-8.15 Automated backport with mergify and removed backport-8.15 Automated backport with mergify labels Jul 5, 2024
mergify bot pushed a commit that referenced this pull request Jul 5, 2024
Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes #13024
---------

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
(cherry picked from commit a453a88)
mergify bot added a commit that referenced this pull request Jul 5, 2024
Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes #13024
---------

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
(cherry picked from commit a453a88)

Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com>
marclop added a commit that referenced this pull request Jul 5, 2024
Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes #13024
---------

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
(cherry picked from commit a453a88)
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

# Conflicts:
#	changelogs/head.asciidoc
#	internal/beater/beater.go
@marclop
Copy link
Contributor Author

marclop commented Jul 5, 2024

Thank you! In case there is another 8.14 release, would it be possible to get this backportet?

@StephanErb We're looking at releasing a patch version 8.14.3 by the end of next week.

marclop added a commit that referenced this pull request Jul 5, 2024
…13577)

Updates the `FlushBytes` setting to default to 1 mib and only override
to 24kb if the user has explicitly set it to 24kb.

Fixes #13024
---------

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
(cherry picked from commit a453a88)
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

# Conflicts:
#	changelogs/head.asciidoc
#	internal/beater/beater.go

* fix conflicts

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

* lint

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

* fix dependency modified by IDE

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

* remove RequireDataStream

Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>

---------

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com>
Co-authored-by: inge4pres <francesco.gualazzi@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.14 Automated backport with mergify backport-8.15 Automated backport with mergify bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perf regression, too many small bulk requests
6 participants