-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make query sharding deterministic (#707)
* Make query sharding deterministic Query sharding was executing queries concurrently and appending their results without any specific order. Unfortunately, basic mathematical operations on floats are not conmutative. Given float numbers a = 0.03298, b = 0.09894, the sum a+a+b differs from a+b+a. We can't fix float arithmetics, but at least we can make the result deterministic, so weird query results will be easier to debug. Signed-off-by: Oleg Zaytsev <[email protected]> * Update CHANGELOG.md Signed-off-by: Oleg Zaytsev <[email protected]> * Update comment in pkg/querier/queryrange/sharded_queryable.go Co-authored-by: Mauro Stettler <[email protected]> * Add conditional comment in labelsForShardsGenerator Signed-off-by: Oleg Zaytsev <[email protected]> * Comment why no mutex is needed Signed-off-by: Oleg Zaytsev <[email protected]> Co-authored-by: Mauro Stettler <[email protected]>
- Loading branch information
Showing
5 changed files
with
162 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters