Conversation
(TODO check how to use CoordinatedRecord to clean memory ) Signed-off-by: ZigRazor <zigrazor@gmail.com>
CodeSee Review Map:Review in an interactive map View more CodeSee Maps Legend |
Corrected crash on print out Graph and Partition Corrected test Corrected Thread Safety for CoordinatePartitionState Signed-off-by: ZigRazor <zigrazor@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
==========================================
+ Coverage 97.15% 97.26% +0.11%
==========================================
Files 41 41
Lines 4748 4647 -101
==========================================
- Hits 4613 4520 -93
+ Misses 135 127 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
This pull request introduces 1 alert and fixes 1 when merging d65dd75 into 6fb620a - view on LGTM.com new alerts:
fixed alerts:
|
Added also tests for this algorithm. Signed-off-by: ZigRazor <zigrazor@gmail.com>
| srand(time(NULL)); | ||
|
|
||
| int choice = rand() % candidates.size(); | ||
| unsigned int seed = (unsigned int)time(NULL); |
There was a problem hiding this comment.
I see a lot of C-style casting. Is there any strong reason not to user C++ static_cast<> syntax? It is safer.
This can be a big change, so it can be open in another ticket
There was a problem hiding this comment.
Yes, I think can be a good issue
| int CoordinatedPartitionState<T>::getTotalReplicas() | ||
| { | ||
| //TODO | ||
| std::lock_guard<std::mutex> lock(*record_map_mutex); |
There was a problem hiding this comment.
I am pro "const" wherever we can and even more for critical things, like mutex, thread-related objects etc.
Then we could say that the code is more protected from unexpected modification related bugs, detected in compiling time
Signed-off-by: ZigRazor <zigrazor@gmail.com>
Signed-off-by: ZigRazor <zigrazor@gmail.com>
|
This pull request introduces 3 alerts and fixes 1 when merging 82a4a0c into e735fc6 - view on LGTM.com new alerts:
fixed alerts:
|

Partitioning HDRF and Other algorithm, with general mechanism