155 proactive wbm flushes - #185
Conversation
6ec1112 to
1be56d4
Compare
8c57b5d to
b2f914c
Compare
3914832 to
ab80cfe
Compare
|
i left some comments. part of isaac i also thinks but i. didnt repeat |
@ayulas - I do not see any comment you have made. Do you agree with all of Isaac's comments? |
|
@hilikspdb - I have added you as a reviewer as well as you are the original designer of the feature and your inputs would be helpful |
|
ayulas started a review @ayulas Reply... size_t new_mem_used = memory_used_.load(std::memory_order_relaxed) + mem; @ayulas Reply... @ayulas Reply... @ayulas Reply... Member @ayulas Reply... Member @ayulas Reply... |
|
@ayulas - Thanks a lot for the review. |
8b8945f to
7fcb1d5
Compare
48b35f3 to
7cdde80
Compare
a748982 to
5362658
Compare
ca21af4 to
ab70b29
Compare
| } | ||
| } | ||
|
|
||
| if (cfds.empty()) { |
There was a problem hiding this comment.
actually you should be protected with the
if (total_size_to_flush < min_size_to_flush) {
return false;
}
cause in case no cfds in DB the total_size_to_flush should be 0 so it menas you passed min_size_to_flush 0 and this is a bug... (not related to this )
second i would have cgecked this after taking the InstrumentedMutexLock
ba91619 to
89d32dd
Compare
58ac961 to
d333a3f
Compare
|
@Yuval-Ariel - Please run full QA on this branch. Thanks |
915d071 to
a9219b1
Compare
| { | ||
| InstrumentedMutexLock lock(&mutex_); | ||
| SelectColumnFamiliesForAtomicFlush(&cfds); | ||
|
|
There was a problem hiding this comment.
why not check if cfds is empty here and return? why move on?
also as i mention in previous review comment - eventhough you the cfds is not empty if all cfds are with no data you should have exit in total_size_to_flush < min_size_to_flush. so if you needed protect this you have a bug that min_size_to_flush is 0
|
|
||
| { | ||
| InstrumentedMutexLock lock(&mutex_); | ||
|
|
There was a problem hiding this comment.
again exit immediately if cfds is empty...
| orig_cfd_to_flush = cfd_to_flush; | ||
|
|
||
| // A CF was picked. Now see if it should be replaced with a lagging CF | ||
| for (auto* cfd : *versions_->GetColumnFamilySet()) { |
There was a problem hiding this comment.
why you created 2 loops?? you can do it in 1
|
@ayulas - I have pushed the changes we have discussed over zoom. |
|
i approve. @Yuval-Ariel go ahead |
5e61136 to
1eaa4f4
Compare
1eaa4f4 to
c8d2420
Compare
@isaac-io - This is a preliminary version not yet ready.
However, due to the time pressure, I would really appreciate your review.
Please focus on the production code parts and leave the unit testing part for later.
Thanks