[BIG-5270] - Reset commit timer every commit call #91
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.
This adjusts the commit timer functionality to roughly ensure a commit occurs at least once every
commit.time.s
seconds since the last commit. Currently this timer functions as a wall clock commit everycommit.time.s
seconds regardless of how recently a commit was performed. In cases where thecommit.time.s
andbackup.time.s
wall clock times overlap such as commit every 300 seconds, backup every 600 seconds, we would previously perform commit -> backup + commit -> commit because the timers would overlap so the subsequent loop after backing up and committing would trip off the commit timer. This adjusts the timer to be less aggressive and only kick in when we haven't committed for roughly maxcommit.time.s
seconds since we callcommit()
multiple places within the mainbuild()
loop.This also adds some more logging around commit / backup start/stop as well as wrapping the commit time metric within the
commit()
function instead of just the timer based commit