db_bench: bug fix inserted in #200 (#263)#265
Merged
Yuval-Ariel merged 1 commit intoNov 28, 2022
Merged
Conversation
udi-speedb
reviewed
Nov 23, 2022
| uint64_t xxh64 = XXH64(str.data(), str.length(), 0); | ||
| // % num_ since the rand num will be used to make keys which are expected in | ||
| // that range | ||
| return xxh64 % num_; |
Contributor
There was a problem hiding this comment.
num_ is int64_t
It may all be OK, but please ask @mrambacher to verify that your fix compiles on Mac.
Just to verify that the modulo between uint64_t and int64_t will not cause any compilation issues
Collaborator
Author
There was a problem hiding this comment.
sure, @mrambacher can you please check that it compiles on your platform. i'll also open a ticket to add the build platform you're using to the CI
Contributor
There was a problem hiding this comment.
I am still seeing this error:
tools/db_bench_tool.cc:8999:21: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
int argc1 = 1 + argv_vec.size();
Contributor
|
Hi,
So is the issue with the "int argc1 = 1 + argv_vec.size();"?
Because it was somehow understood that it's with the XXH64
Udi
…On Sat, Nov 26, 2022 at 9:57 PM mrambacher ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tools/db_bench_tool.cc
<#265 (comment)>:
> @@ -6851,7 +6851,7 @@ class Benchmark {
// deterministically turns range_num to unsigned int
uint64_t range_num_to_rand(uint64_t range_num) {
std::string str = std::to_string(range_num);
- unsigned int xxh64 = XXH64(str.data(), str.length(), 0);
+ uint64_t xxh64 = XXH64(str.data(), str.length(), 0);
// % num_ since the rand num will be used to make keys which are expected in
// that range
return xxh64 % num_;
I am still seeing this error:
tools/db_bench_tool.cc:8999:21: error: implicit conversion loses integer
precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
int argc1 = 1 + argv_vec.size();
—
Reply to this email directly, view it on GitHub
<#265 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZKU2DGTLKYLFM4QVY3SIQTWKJTT5ANCNFSM6AAAAAASIUXJXU>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
--
Udi Ron
S/W Engineer
www.speedb.io | www.speed.dev <http://www.speedb.dev/>
Can you hear the buzz?
<https://github.com/speedb-io/speedb>
<https://forum.speedb.dev/>
Please consider our environment and only print this email if you really
have to.
This email is confidential and solely intended for the addressee.
If you receive this email in error please notify the sender by return.
|
Contributor
|
Hi,
Could you please fix on your side, verify that it passes compilation and
send the fix to Yuval to so we can forget about it and move on?
Thanks,
Udi
…On Sun, Nov 27, 2022 at 8:28 AM Udi Ron ***@***.***> wrote:
Hi,
So is the issue with the "int argc1 = 1 + argv_vec.size();"?
Because it was somehow understood that it's with the XXH64
Udi
On Sat, Nov 26, 2022 at 9:57 PM mrambacher ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In tools/db_bench_tool.cc
> <#265 (comment)>:
>
> > @@ -6851,7 +6851,7 @@ class Benchmark {
> // deterministically turns range_num to unsigned int
> uint64_t range_num_to_rand(uint64_t range_num) {
> std::string str = std::to_string(range_num);
> - unsigned int xxh64 = XXH64(str.data(), str.length(), 0);
> + uint64_t xxh64 = XXH64(str.data(), str.length(), 0);
> // % num_ since the rand num will be used to make keys which are expected in
> // that range
> return xxh64 % num_;
>
> I am still seeing this error:
> tools/db_bench_tool.cc:8999:21: error: implicit conversion loses integer
> precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
> int argc1 = 1 + argv_vec.size();
>
> —
> Reply to this email directly, view it on GitHub
> <#265 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AZKU2DGTLKYLFM4QVY3SIQTWKJTT5ANCNFSM6AAAAAASIUXJXU>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
--
Udi Ron
S/W Engineer
www.speedb.io | www.speed.dev <http://www.speedb.dev/>
Can you hear the buzz?
<https://github.com/speedb-io/speedb>
<https://forum.speedb.dev/>
Please consider our environment and only print this email if you really
have to.
This email is confidential and solely intended for the addressee.
If you receive this email in error please notify the sender by return.
--
Udi Ron
S/W Engineer
www.speedb.io | www.speed.dev <http://www.speedb.dev/>
Can you hear the buzz?
<https://github.com/speedb-io/speedb>
<https://forum.speedb.dev/>
Please consider our environment and only print this email if you really
have to.
This email is confidential and solely intended for the addressee.
If you receive this email in error please notify the sender by return.
|
Collaborator
Author
|
using the -Wconversion flag raises the above issues but many more (too many).. |
d3cd8ae to
8b1a148
Compare
udi-speedb
approved these changes
Nov 28, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.