-
Notifications
You must be signed in to change notification settings - Fork 106
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
[ASI-976] [REPLICA] Fix StateMachineQueue unreliability + expose stateMachineQueue status via health check #2861
Merged
Conversation
This file contains 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
SidSethi
changed the title
Ss reconfig fixes v2
[ASI-976] [REPLICA] Fix StateMachineQueue unreliability + expose stateMachineQueue status via health check
Apr 6, 2022
dmanjunath
approved these changes
Apr 6, 2022
SidSethi
added a commit
that referenced
this pull request
Apr 8, 2022
…eMachineQueue status via health check (#2861)
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.
Note - this is a copy of previous branch #2774 , opened new branch since this was easier than resolving all the merge conflicts while trying to remove the commits I reverted from master previously. Please see previous PR for discussion
Note - I also removed the stateMachineQueue redis lock since it ended up creating more issues. Specifically when a node restarts mid job, the lock is not released. I added code to ensure it is released on each init but for some reason that didn't work. Basically, not worth the hassle for what is in the end redundant logic.
Description
done()
callback consumption in queue processing. this is actually incorrect pattern and should not be combined with async-await processing. (note - don't think this was really causing any errors, but unclear lol)stateMachineQueueLatestJobSuccess
andstateMachineQueueLatestJobStart
+ expose via monitors in health check, and configure health check to error ifenforceStateMachineQueueHealth
flag passedsnapbackModuloBase
to 48 (from 24) and decreasesnapbackJobInterval
to 30min (from 60min)peerSetManager
axios reqsstateMachineQueue
lockDuration
from default 30s to 2xsnapbackJobInterval
to ensure job does not get prematurely marked as stalledmaxStalledCount
from default 1 to 0 to ensure stalled jobs are never re-processedstateMachineQueue
from a setTimeout with manual re-add to a cron onsnapbackJobInterval
(note - have not confirmed whether this does anything, but lets see)processStateMachineOperationDecisionTree
stage + improve the logging codebatch_clock_status
request timeout from 20s to 10sTests
Automated CN tests should all still pass, but that doesn't help much with snapback testing.
For regression testing, confirmed via mad-dog with
manualSyncsDisabled = true
that content is still being synced correctlyThe main validation here is that I've already released this to staging and have confirmed jobs are being correctly processed
How will this change be monitored? Are there sufficient logs?
Will wire up the new
stateMachineQueueLatestJobSuccess
health check field to a Pingdom alert to ensure jobs are being processed correctlyInstances of
batch_clock_status
req timeouts with log msg[retrieveClockStatusesForUsersAcrossReplicaSet] Could not fetch clock values for wallets=${walletsOnReplica} on replica=${replica} ${errorMsg.toString()}