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

Added fsyncEnabled option to the config #1425

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

sbylica-splunk
Copy link
Collaborator

Description: Added fsyncEnabled flag, it is passed to file storage used by the agent. This is related to the issue:
https://splunk.atlassian.net/browse/ADDON-71899

With this flag enabled we can avoid issues with data corruption in the future.

Testing: Manual testing

Documentation: Flag is described in values.yaml

@sbylica-splunk sbylica-splunk requested review from a team as code owners August 28, 2024 11:52
@atoulme
Copy link
Contributor

atoulme commented Aug 29, 2024

Please rebase, make render and push --force. See my comments on allowing to pass the default from upstream unless we explicitly override if possible.

@@ -121,6 +121,11 @@ splunkPlatform:
enabled: false
storagePath: "/var/addon/splunk/exporter_queue"

# Option to disable or enable fsync for filestorage extension used by the agent. Enabling this option will ensure
# database integrity at the cost of performance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know what the performance cost is by any chance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really, performance is mentioned here:
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage#file-storage

I think that this is strange since our filestorage extension sets fsync to false by default (so nosync in bbolt is set to true), but if we dig more into that, the recommendation is to keep nosync flag as false. As seen here:
https://pkg.go.dev/go.etcd.io/bbolt#DB

This makes sense as we now know that this flag caused some problems for our customers.
I think that we should expose this flag, keep its value as is (so fsync is set to false), and maybe do some performance tests to see if we can change it in the future.

Copy link
Contributor

@atoulme atoulme Sep 4, 2024

Choose a reason for hiding this comment

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

OK so 2 follow-ups:

  • one issue in contrib to have performance test benchmarks with and without this setting
  • one issue in contrib to have this setting changed to the right default per bbolt.

Would you like to file those issues?

@sbylica-splunk sbylica-splunk force-pushed the add_fsync_flag_config branch 2 times, most recently from f04b848 to ed1d442 Compare September 3, 2024 10:25
@sbylica-splunk sbylica-splunk merged commit b7b3246 into signalfx:main Sep 6, 2024
42 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants