-
Notifications
You must be signed in to change notification settings - Fork 7k
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 inconsistent aggregate function states in mixed x86-64 / ARM clusters #60610
Fix inconsistent aggregate function states in mixed x86-64 / ARM clusters #60610
Conversation
This is an automated comment for commit 3a4ef70 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
@rschu1ze, could you or somebody in ClickHouse team review the PR? Thanks! |
Thanks for tracking this down. Didn't know about Thoughts:
|
Besides that, test results in CI look good. |
set (COMPILER_FLAGS "${COMPILER_FLAGS}") | ||
|
||
# Disable floating-point expression contraction in order to get consistent floating point calculation results across platforms | ||
set (COMPILER_FLAGS "${COMPILER_FLAGS} -ffp-contract=off") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put in a newline after l. 323 to make this visually more pleasing, and I'll be happy :-)
(some performance tests aborted due to infrastructure issues, so fresh runs would be needed anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Performance of queries with functions |
ClickHouse Integration Tests (tsan) [6/6]:
Performance tests:
ClickHouse AST Fuzzer fail with a generic error. I looked at the server and fuzzer logs, but it is not really clear to me what is going wrong. For sure no sanitizer issue and unrelated. |
In mixed x86-64 / ARM clusters, aggregate function states can be created differently since ARM sometimes calculates slightly different floating-point results.
This blog contains some related tests for the issue.
The fix is to use compiler flag
-ffp-contract=off
to make sure ARM floating-point calculation produce the same results as on x86-64.The functional test
02813_seriesDecomposeSTL.sql
(which was disabled on ARM) can be used to test the fix, this PR enables it on ARM.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed potentially inconsistent aggregate function states in mixed x86-64 / ARM clusters.