Skip to content

db_bench: bug fix inserted in #200 (#263)#265

Merged
Yuval-Ariel merged 1 commit into
yuval/rebase-7.7.3from
263-db_bench-int-conversion-bug-inserted-in-200
Nov 28, 2022
Merged

db_bench: bug fix inserted in #200 (#263)#265
Yuval-Ariel merged 1 commit into
yuval/rebase-7.7.3from
263-db_bench-int-conversion-bug-inserted-in-200

Conversation

@Yuval-Ariel

Copy link
Copy Markdown
Collaborator

No description provided.

@Yuval-Ariel Yuval-Ariel self-assigned this Nov 23, 2022
@Yuval-Ariel Yuval-Ariel linked an issue Nov 23, 2022 that may be closed by this pull request
Comment thread tools/db_bench_tool.cc
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_;

@udi-speedb udi-speedb Nov 23, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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();

@udi-speedb

udi-speedb commented Nov 27, 2022 via email

Copy link
Copy Markdown
Contributor

@udi-speedb

udi-speedb commented Nov 27, 2022 via email

Copy link
Copy Markdown
Contributor

@Yuval-Ariel

Copy link
Copy Markdown
Collaborator Author

using the -Wconversion flag raises the above issues but many more (too many)..

@Yuval-Ariel Yuval-Ariel changed the base branch from main to yuval/rebase-7.7.3 November 28, 2022 10:06
@Yuval-Ariel Yuval-Ariel force-pushed the 263-db_bench-int-conversion-bug-inserted-in-200 branch from d3cd8ae to 8b1a148 Compare November 28, 2022 10:13
@udi-speedb udi-speedb self-requested a review November 28, 2022 15:34
@Yuval-Ariel Yuval-Ariel merged commit 810110f into yuval/rebase-7.7.3 Nov 28, 2022
@Yuval-Ariel Yuval-Ariel deleted the 263-db_bench-int-conversion-bug-inserted-in-200 branch December 20, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

db_bench: int conversion bug inserted in #200

3 participants