-
Notifications
You must be signed in to change notification settings - Fork 111
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
CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) #3426
Conversation
@@ -51,100 +51,87 @@ module.exports = async function ({ | |||
const unhealthyPeersSet = new Set(unhealthyPeers || []) |
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.
notable changes here:
findSyncsForUser now returns outcomes with syncMode in addition to result
instead of SyncPrimaryFromSecondary having its own log + result type (see prometheus.constants changes), it is now a different label, since all the other result types also apply to that sync mode
most other changes follow on from above, including refactor + simplification of metric recording + logging code
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.
not as much comments as questions. not as familiar with this new job processor code so trying to learn it as i go. i'll do another pass but just left the first round of questions
...r-node/src/services/stateMachineManager/stateReconciliation/issueSyncRequest.jobProcessor.js
Outdated
Show resolved
Hide resolved
creator-node/src/services/stateMachineManager/stateMonitoring/findSyncRequests.jobProcessor.js
Show resolved
Hide resolved
## Changelog - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
## Changelog - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
## Changelog - 2022-07-18 [7f27e3d] Always require syncMode to be defined (#3497) [Dheeraj Manjunath] - 2022-07-18 [283249d] Run image bake without monitoring (#3499) [Dheeraj Manjunath] - 2022-07-18 [81e43fc] Make new beatfile in each (#3496) [Raymond Jacobson] - 2022-07-18 [c6ad867] [CON-256] /export route can return inconsistent data (#3480) [Johannes Naylor] - 2022-07-18 [ae93f81] Expose trusted notifier data in health check + tests (#3486) [vicky :)] - 2022-07-18 [242370d] throw error for function requiring window (#3493) [nicoback2] - 2022-07-16 [327251f] Cleanup output (#3492) [Cheran] - 2022-07-16 [dfa66d3] Add chain network id for client fixes (#3490) [Cheran] - 2022-07-16 [6f9cc9c] [INF-188] Verify contracts on POA for block explorer (#3491) [Cheran] - 2022-07-15 [9c06d04] Fix migration ordering (#3489) [Raymond Jacobson] - 2022-07-15 [67dc7d8] Increase start.sh timeout (#3483) [Raymond Jacobson] - 2022-07-15 [1dc64bc] [PLAT-254] Remove is_creator usage across protocol (#3475) [Raymond Jacobson] - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
## Changelog - 2022-07-19 [5cd2cc0] Add npmrc credential (#3500) [Joaquin Casares] - 2022-07-19 [db3b7ea] INF-173 Fix upload-dashboards.sh and support library panels (#3439) [Joaquin Casares] - 2022-07-19 [7a9e37d] Fix unread count (#3505) [Michael Piazza] - 2022-07-19 [fbf31bb] fix setauthfn / setuserfn types (#3502) [nicoback2] - 2022-07-19 [b6e3740] Don't dedupe manual syncs to secondaries (#3498) [Dheeraj Manjunath] - 2022-07-19 [e871a35] Add state machine README (#3411) [Theo Ilie] - 2022-07-18 [3517ee3] Fix CN nodejs version (#3501) [Cheran] - 2022-07-18 [c3e886a] Misc state machine improvements / bug fixes (#3487) [Theo Ilie] - 2022-07-18 [7f27e3d] Always require syncMode to be defined (#3497) [Dheeraj Manjunath] - 2022-07-18 [283249d] Run image bake without monitoring (#3499) [Dheeraj Manjunath] - 2022-07-18 [81e43fc] Make new beatfile in each (#3496) [Raymond Jacobson] - 2022-07-18 [c6ad867] [CON-256] /export route can return inconsistent data (#3480) [Johannes Naylor] - 2022-07-18 [ae93f81] Expose trusted notifier data in health check + tests (#3486) [vicky :)] - 2022-07-18 [242370d] throw error for function requiring window (#3493) [nicoback2] - 2022-07-16 [327251f] Cleanup output (#3492) [Cheran] - 2022-07-16 [dfa66d3] Add chain network id for client fixes (#3490) [Cheran] - 2022-07-16 [6f9cc9c] [INF-188] Verify contracts on POA for block explorer (#3491) [Cheran] - 2022-07-15 [9c06d04] Fix migration ordering (#3489) [Raymond Jacobson] - 2022-07-15 [67dc7d8] Increase start.sh timeout (#3483) [Raymond Jacobson] - 2022-07-15 [1dc64bc] [PLAT-254] Remove is_creator usage across protocol (#3475) [Raymond Jacobson] - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
## Changelog - 2022-07-19 [384b036] INF-86 use new audius-infra ssh key for merging audius-sdk branches (#3508) [Joaquin Casares] - 2022-07-19 [99107b3] [CON-221] Create metric to track users entirely on foundation nodes (#3462) [Johannes Naylor] - 2022-07-19 [5cd2cc0] Add npmrc credential (#3500) [Joaquin Casares] - 2022-07-19 [db3b7ea] INF-173 Fix upload-dashboards.sh and support library panels (#3439) [Joaquin Casares] - 2022-07-19 [7a9e37d] Fix unread count (#3505) [Michael Piazza] - 2022-07-19 [fbf31bb] fix setauthfn / setuserfn types (#3502) [nicoback2] - 2022-07-19 [b6e3740] Don't dedupe manual syncs to secondaries (#3498) [Dheeraj Manjunath] - 2022-07-19 [e871a35] Add state machine README (#3411) [Theo Ilie] - 2022-07-18 [3517ee3] Fix CN nodejs version (#3501) [Cheran] - 2022-07-18 [c3e886a] Misc state machine improvements / bug fixes (#3487) [Theo Ilie] - 2022-07-18 [7f27e3d] Always require syncMode to be defined (#3497) [Dheeraj Manjunath] - 2022-07-18 [283249d] Run image bake without monitoring (#3499) [Dheeraj Manjunath] - 2022-07-18 [81e43fc] Make new beatfile in each (#3496) [Raymond Jacobson] - 2022-07-18 [c6ad867] [CON-256] /export route can return inconsistent data (#3480) [Johannes Naylor] - 2022-07-18 [ae93f81] Expose trusted notifier data in health check + tests (#3486) [vicky :)] - 2022-07-18 [242370d] throw error for function requiring window (#3493) [nicoback2] - 2022-07-16 [327251f] Cleanup output (#3492) [Cheran] - 2022-07-16 [dfa66d3] Add chain network id for client fixes (#3490) [Cheran] - 2022-07-16 [6f9cc9c] [INF-188] Verify contracts on POA for block explorer (#3491) [Cheran] - 2022-07-15 [9c06d04] Fix migration ordering (#3489) [Raymond Jacobson] - 2022-07-15 [67dc7d8] Increase start.sh timeout (#3483) [Raymond Jacobson] - 2022-07-15 [1dc64bc] [PLAT-254] Remove is_creator usage across protocol (#3475) [Raymond Jacobson] - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
## Changelog - 2022-07-19 [384b036] INF-86 use new audius-infra ssh key for merging audius-sdk branches (#3508) [Joaquin Casares] - 2022-07-19 [99107b3] [CON-221] Create metric to track users entirely on foundation nodes (#3462) [Johannes Naylor] - 2022-07-19 [5cd2cc0] Add npmrc credential (#3500) [Joaquin Casares] - 2022-07-19 [db3b7ea] INF-173 Fix upload-dashboards.sh and support library panels (#3439) [Joaquin Casares] - 2022-07-19 [7a9e37d] Fix unread count (#3505) [Michael Piazza] - 2022-07-19 [fbf31bb] fix setauthfn / setuserfn types (#3502) [nicoback2] - 2022-07-19 [b6e3740] Don't dedupe manual syncs to secondaries (#3498) [Dheeraj Manjunath] - 2022-07-19 [e871a35] Add state machine README (#3411) [Theo Ilie] - 2022-07-18 [3517ee3] Fix CN nodejs version (#3501) [Cheran] - 2022-07-18 [c3e886a] Misc state machine improvements / bug fixes (#3487) [Theo Ilie] - 2022-07-18 [7f27e3d] Always require syncMode to be defined (#3497) [Dheeraj Manjunath] - 2022-07-18 [283249d] Run image bake without monitoring (#3499) [Dheeraj Manjunath] - 2022-07-18 [81e43fc] Make new beatfile in each (#3496) [Raymond Jacobson] - 2022-07-18 [c6ad867] [CON-256] /export route can return inconsistent data (#3480) [Johannes Naylor] - 2022-07-18 [ae93f81] Expose trusted notifier data in health check + tests (#3486) [vicky :)] - 2022-07-18 [242370d] throw error for function requiring window (#3493) [nicoback2] - 2022-07-16 [327251f] Cleanup output (#3492) [Cheran] - 2022-07-16 [dfa66d3] Add chain network id for client fixes (#3490) [Cheran] - 2022-07-16 [6f9cc9c] [INF-188] Verify contracts on POA for block explorer (#3491) [Cheran] - 2022-07-15 [9c06d04] Fix migration ordering (#3489) [Raymond Jacobson] - 2022-07-15 [67dc7d8] Increase start.sh timeout (#3483) [Raymond Jacobson] - 2022-07-15 [1dc64bc] [PLAT-254] Remove is_creator usage across protocol (#3475) [Raymond Jacobson] - 2022-07-15 [9231623] INF-86 Automate publishing libs in CircleCI (#3447) [Joaquin Casares] - 2022-07-15 [281da8e] Move trusted notifier init back to await-ed init (#3485) [Dheeraj Manjunath] - 2022-07-15 [cc8cf26] Fix hot reload of libs (#3481) [Cheran] - 2022-07-15 [e3bb6f5] [INF-180] Add SOCKS5 proxy for use with client (#3467) [Cheran] - 2022-07-14 [df69fa6] CON-250 - stateMachine updates to consume primarySyncFromSecondary (Divergent state recovery #3) (#3426) [Sid Sethi]
[2c08c63] [C-2653] Add shallow argument to audius-query hooks (#3450) Andrew Mendelsohn [0e5d1b3] [PAY-1247] Cap height of chat textinput on mobile (#3447) Reed [efaa425] [PAY-1243] Mobile chat header touchable feedback (#3448) Reed [3980e00] [C-2647] Use entire cache to denormalize data (#3449) Andrew Mendelsohn [1395822] [PAY-1150] Disable scrolling when chat reaction popup is active (#3445) Reed [f4ad5f7] [C-2592] Fix edit playlist (#3443) Kyle Shanks [875054a] Fix mobile native change comment C-2657 (#3444) nicoback2 [63b5ab4] Bump SDK version and change walletapi to auth (#3440) nicoback2 [1611465] DMs: Use unblock/block confirmation modals on profile (#3437) Marcus Pasell [179dda6] [PAY-1142] DMs: Update chat tail (#3438) Marcus Pasell [95f1843] [PAY-946] Handle signed out users across DMs (#3423) Michael Piazza [682eebb] [C-2649] Refactor desktop collection header (#3441) Dylan Jeffers [7310fae] [PAY-800][PAY-1249][PAY-1250] Display track and playlist tiles in web chats - Part 1 (#3377) Saliou Diallo [689fbcb] [PAY-1274] DMs: Unsticky inbox unavailable message (#3435) Marcus Pasell [0212e19] Fix unread count incorrect on mobile chats (#3430) Reed [6743352] Update legacy playlist screens to use legacy inputs (#3436) Kyle Shanks [fb25e74] [CON-678] v2 user profile edit (#3431) Theo Ilie [abf827f] [PAY-1255] [PAY-1245] DMs: Add confirmation modals (#3424) Marcus Pasell [536d3c6] Make mobile chat inbox unavailable message unsticky (#3434) Reed [f11f266] [PAY-1273] Fix scrolling issues (#3433) Michael Piazza [26ec389] [PAY-1258] Add toast when chat messages are copied (#3421) Randy Schott [9ba1956] [PAY-1251] [PAY-1188] DMs: Add error message to failed message sends (#3428) Marcus Pasell [14034ae] [C-2597][C-2651] Add audius-query usage docs (#3427) Andrew Mendelsohn [16deebc] [C-2508] Update playback positions to be tracked per user id (#3374) Kyle Shanks [2d6b278] [C-2644] Fix issue where new playlist drag-drop not persisting (#3422) Dylan Jeffers [a9c2c5e] [PAY-1212] [PAY-1146] Reactions and message UI polish (#3414) Michael Piazza [ab8bd6b] Type fix for hook options (#3426) Andrew Mendelsohn [d167810] [PAY-1272] Make desktop DM text copyable (#3425) Michael Piazza [7ba5973] [PAY-925] Adds unread message icons on web (#3418) Randy Schott [645f0a5] [PAY-935] Fix ChatHeader issue (#3419) Michael Piazza [cc1c6e8] Update mobile playlist create flows to conform with new designs (#3416) Kyle Shanks [9701930] [PAY-1260] New chat tails on mobile (#3420) Reed [dd2873e] [PAY-1241] Skeleton for mobile chat list screen (#3393) Reed [a373e62] [PAY-1253] Mobile message resend button (#3413) Reed [ddc5540] Fix type error track availability modal C-2632 (#3415) nicoback2 [19929b9] [C-2601 C-2627 C-2628 C-2638] Playlist library QA (#3411) Dylan Jeffers [5a7f61a] [C-2468] Add desktop create flow (#3409) Dylan Jeffers [b0c1583] Mark chat as read on ChatScreen entry (#3410) Reed [6e120cd] [PAY-1222] Fix unread messages count (#3407) Michael Piazza [95dd306] [C-2299] Fix NowPlayingDrawer navigation deduping bug (#3405) Sebastian Klingler [01fcab4] [PAY-1195] Mobile chat screen unavailable states (#3402) Reed [67b1788] [C-2598] Add types for audius-query hooks (#3406) Andrew Mendelsohn [8bf784a] Increase space between chat reaction and copy message button (#3403) Reed [2cba881] Fix upload collection C-2630 (#3404) nicoback2 [aee7653] [PAY-1242] Mobile chats copy message button (#3399) Reed [01ec1fb] [PAY-1220] Fix chat receive bug (#3400) Michael Piazza [0ad899c] Add useAuthenticatedCallback (#3392) Dylan Jeffers [412ca92] Improve popup-menu a11y (#3394) Dylan Jeffers [ecdfb7e] [PAY-1136][PAY-1129] Add infinite loading to albums on desktop / mobile web (#3371) Randy Schott [35678eb] [PAY-1028] Fix mobile chat actions drawer touch feedback (#3388) Reed
Description
Update
findSyncRequests.jobProcessor
to remove the placeholder TODO for primarySyncToSecondary, instead it now correctly processes state whensyncMode = MergePrimaryAndSecondary
Update
issueSyncRequest.jobProcessor
to handlesyncMode = MergePrimaryAndSecondary
:primarySyncFromSecondary()
, then issues sync request to secondary withforceResync = true
mergePrimaryAndSecondaryEnabled
defaulted to true for local, and false for prodAlso:
findSyncRequests
changesfind_sync_request_counts
prometheus gauge to record syncMode as separate labelTests
New test coverage
Monitoring - How will this change be monitored? Are there sufficient logs / alerts?
Logs containing
Recorded findSyncRequests from primary
Check
/prometheus_metrics
forfind_sync_request_counts
Logs containing
Sync mode is disabled
Logs containing
primarySyncFromSecondary failed with error