You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/07/12 07:49:44 UTC
[GitHub] [kvrocks] enjoy-binbin opened a new pull request, #1583: Fix flaky test TestZset ZRANGEBYSCORE_fuzzy_test
enjoy-binbin opened a new pull request, #1583:
URL: https://github.com/apache/kvrocks/pull/1583
The old code used fmt.Sprintf("%f") to handle float,
it will have a loss of precision.
A simple go example:
```
func main(){
min1, max1 := rand.Float64(), rand.Float64()
fmt.Println(min1) // 0.6046602879796196
fmt.Println(max1) // 0.9405090880450124
min2, max2 := fmt.Sprintf("%v", min1), fmt.Sprintf("%v", max1)
fmt.Println(min2) // 0.6046602879796196
fmt.Println(max2) // 0.9405090880450124
min3, max3 := fmt.Sprintf("%f", min1), fmt.Sprintf("%f", max1)
fmt.Println(min3) // 0.604660
fmt.Println(max3) // 0.940509
}
```
As we can see in the example, the min / max is inaccurate
after the %f handle. So in our test, it is ok get the unexpected
result in range.
i.e. min, max are actually accurate, but the arguments we
use for zrange is actually inaccurate.
Fix #1552
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] tisonkun merged pull request #1583: Fix flaky test TestZset ZRANGEBYSCORE_fuzzy_test
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #1583:
URL: https://github.com/apache/kvrocks/pull/1583
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] tisonkun commented on pull request #1583: Fix flaky test TestZset ZRANGEBYSCORE_fuzzy_test
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #1583:
URL: https://github.com/apache/kvrocks/pull/1583#issuecomment-1632394279
... and thanks for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] enjoy-binbin commented on pull request #1583: Fix flaky test TestZset ZRANGEBYSCORE_fuzzy_test
Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on PR #1583:
URL: https://github.com/apache/kvrocks/pull/1583#issuecomment-1632020364
I ran it locally and it passed, hope that we can run it a few more times in github CI to verify it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kvrocks] tisonkun commented on pull request #1583: Fix flaky test TestZset ZRANGEBYSCORE_fuzzy_test
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #1583:
URL: https://github.com/apache/kvrocks/pull/1583#issuecomment-1632393734
Let's give it a try. It's semantically no regressions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org