dynamic delay: fix pending bytes rate calculation - #451
Merged
Conversation
RoyBenMoshe
reviewed
Mar 29, 2023
| } | ||
| uint64_t step_size = ceil(soft_hard_range / kNumPendingSteps); | ||
| uint64_t extra_bytes = compaction_needed_bytes - soft_limit; | ||
| assert(extra_bytes > 0); |
Contributor
There was a problem hiding this comment.
I think this condition is always true
Contributor
Author
There was a problem hiding this comment.
you're right, useless assert indeed. i'll remove it
RoyBenMoshe
previously approved these changes
Mar 30, 2023
Yuval-Ariel
force-pushed
the
dynamic-delay-fix-pending-bytes-calc
branch
from
March 30, 2023 07:04
3e68c7e to
54eac36
Compare
RoyBenMoshe
previously approved these changes
Mar 30, 2023
Yuval-Ariel
force-pushed
the
dynamic-delay-fix-pending-bytes-calc
branch
from
March 30, 2023 09:20
54eac36 to
01dc130
Compare
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
Yuval-Ariel
force-pushed
the
dynamic-delay-fix-pending-bytes-calc
branch
from
March 30, 2023 09:21
01dc130 to
af39610
Compare
Contributor
Author
|
@RoyBenMoshe one last time (hopefully) |
RoyBenMoshe
approved these changes
Mar 30, 2023
Contributor
Author
|
passed performance tests - large obj and small db with single disk both. no degradation |
Yuval-Ariel
added a commit
that referenced
this pull request
May 2, 2023
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
Yuval-Ariel
added a commit
that referenced
this pull request
May 4, 2023
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
udi-speedb
pushed a commit
that referenced
this pull request
Nov 13, 2023
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
udi-speedb
pushed a commit
that referenced
this pull request
Nov 15, 2023
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
udi-speedb
pushed a commit
that referenced
this pull request
Dec 4, 2023
use fixed num delay steps instead of fixing the step size and deducing the num steps. this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.
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.
closes #431
use fixed num delay steps instead of fixing the step size and deducing the num steps.
this makes the code simpler and avoids a bug when the excess bytes are greater than num_steps * step_size which then fails the assert: assert(step_num < num_steps); - since step_num == num_steps.