Fix #6102#6384
Merged
Merged
Conversation
Member
Author
|
/cmd prdoc |
bkchr
approved these changes
Nov 6, 2024
| .try_fold(PartsOf57600::ZERO, |sum, parts| { | ||
| sum.checked_add(parts).ok_or(Error::<T>::OverScheduled) | ||
| })?; | ||
| ensure!(parts_sum.is_full(), Error::<T>::UnderScheduled); |
Member
There was a problem hiding this comment.
What happens if the schedule is split up, but we only receive one message in time? Will it break any assumptions if we don't have the full parts scheduled?
Member
Author
There was a problem hiding this comment.
No. I checked, the code does not really care whether the schedule is full or not.
Contributor
There was a problem hiding this comment.
Probably worth a unit test in case this behaviour is changed in future.
Should be very quick to add - just an additional core that is not fully assigned in the test.
added 2 commits
November 6, 2024 12:49
alindima
approved these changes
Nov 6, 2024
seadanda
approved these changes
Nov 6, 2024
| .try_fold(PartsOf57600::ZERO, |sum, parts| { | ||
| sum.checked_add(parts).ok_or(Error::<T>::OverScheduled) | ||
| })?; | ||
| ensure!(parts_sum.is_full(), Error::<T>::UnderScheduled); |
Contributor
There was a problem hiding this comment.
Probably worth a unit test in case this behaviour is changed in future.
Should be very quick to add - just an additional core that is not fully assigned in the test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relax requirements for
assign_coreso that it accepts updates for the last scheduled entry.Fixes #6102