-
Notifications
You must be signed in to change notification settings - Fork 25
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
[c++] Handling edge cases for C++ re-indexer #2098
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2098 +/- ##
==========================================
+ Coverage 76.72% 80.06% +3.33%
==========================================
Files 136 87 -49
Lines 10672 8040 -2632
Branches 207 0 -207
==========================================
- Hits 8188 6437 -1751
+ Misses 2386 1603 -783
+ Partials 98 0 -98
Flags with carried forward coverage won't be shown. Click here to find out more.
|
7450694
to
a00b3d1
Compare
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.
functionally looks fine, but it could be simplified and cleaned up a bit:
- use unsigned types for arguments which should never (can never) be negative.
- remove thread_count_ instance value which, as used, seems redundant with the tiledb_thread_pool_ slot
8b85b19
to
a0ac10c
Compare
@bkmartinjr done with fixing both issue and now waiting for CI |
if (size == 0) { | ||
return; | ||
} | ||
if (threads == 0) { | ||
throw std::runtime_error("Re-indexer thread count cannot be zero."); | ||
} | ||
|
||
LOG_DEBUG(fmt::format( |
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.
any reason to have duplicate logging here - same information is in both statements....
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.
fixed
LOG_DEBUG(fmt::format( | ||
"Lookup with thread concurrency {} on data size {}", | ||
tiledb_thread_pool_->concurrency_level(), | ||
size)); |
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.
nit: these two log lines are largely redundant as well
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.
fixed
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.
tiny nit: comment in line 30 is incorrect (looks like copy & paste error)
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.
a couple of minor nits to pick, otherwise LGTM. TY.
a0ac10c
to
0962ae8
Compare
0962ae8
to
f6678fe
Compare
Issue and/or context:
Some of the edge case like negative size table and handling thread sizes smaller or equal to one could be handled better
Changes:
Notes for Reviewer: