-
Notifications
You must be signed in to change notification settings - Fork 9
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
#2033: lb: rewrite and fix bugs in OfflineLB/LBDataRestartReader #2034
Conversation
Tests are coming. |
7042e87
to
301e21d
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.
I wonder if we need to make this more general. Please see the comment below.
301e21d
to
a82b78c
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2034 +/- ##
===========================================
+ Coverage 84.75% 84.86% +0.11%
===========================================
Files 722 723 +1
Lines 25600 25549 -51
===========================================
- Hits 21696 21683 -13
+ Misses 3904 3866 -38
|
9a187c0
to
9bace2f
Compare
for (PhaseType phase = 0; phase < num_phases_; phase++) { | ||
auto iter = lbdh.node_data_.find(phase); | ||
if (iter == lbdh.node_data_.end()) { | ||
history_[phase] = history_[prev_known_phase]; |
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.
This is an interesting solution to the problem. Could we end up using too much memory this way? My original thought was that the LB interval would likely not be 1, so only a subset of the phases would be needed anyway. I think it's also possible to mix OfflineLB
with another load balancer (on different phases) by using an LB config file.
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.
Perhaps we should only store the phases for which the LB configuration would use OfflineLB
?
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.
I agree that it uses more memory than necessary. It was just the easiest way to write the code. I can do a search each time instead that will find the last previous known phase.
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.
Ok based on our conversation, for the sake of this PR, we are going to assume that the phase specification is dense is fully specified for every phase up to num_phases.
9bace2f
to
4905eda
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.
Looks good to me
Fixes #2033