Skip to content
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

Only record sync failures #4411

Merged
merged 1 commit into from
Nov 30, 2022
Merged

Only record sync failures #4411

merged 1 commit into from
Nov 30, 2022

Conversation

vicky-g
Copy link
Contributor

@vicky-g vicky-g commented Nov 30, 2022

Description

This is so that aborted syncs are not recorded.

Current environment:

127.0.0.1:6379> keys PRIMARY*
1) "PRIMARY_TO_SECONDARY_SYNC_FAILURE::2022-11-30::https://creatornode9.staging.audius.co/::0xa722151fdff6dc5c94803b4712d63730ea6feb08"
2) "PRIMARY_TO_SECONDARY_SYNC_FAILURE::2022-11-30::https://creatornode8.staging.audius.co/::0xa722151fdff6dc5c94803b4712d63730ea6feb08"
127.0.0.1:6379> hgetall PRIMARY_TO_SECONDARY_SYNC_FAILURE::2022-11-30::https://creatornode9.staging.audius.co/::0xa722151fdff6dc5c94803b4712d63730ea6feb08
1) "abort_sync_in_progress"
2) "1"
127.0.0.1:6379> hgetall PRIMARY_TO_SECONDARY_SYNC_FAILURE::2022-11-30::https://creatornode8.staging.audius.co/::0xa722151fdff6dc5c94803b4712d63730ea6feb08
1) "abort_sync_in_progress"
2) "1"

Tests

  • forced an abort and observed logs

server logs:

{"name":"audius_creator_node","clusterWorker":"master","hostname":"48a6f6fb4782","pid":136233,"wallet":"0xc3d1d7559356aac64ba2921ec266ce294dcdc981","sync":"secondarySyncFromPrimary","primary":"http://cn3_creator-node_1:4002","syncAllStepsDuration":0,"level":40,"msg":"Sync complete for wallet: 0xc3d1d7559356aac64ba2921ec266ce294dcdc981. Status: Abort. Duration sync: 1. From endpoint http://cn3_creator-node_1:4002. Prometheus result: abort_sync_in_progress","time":"2022-11-30T20:11:27.720Z","v":0,"trace_id":"9bbd50d6597bfbbe801a76854ae98d27","span_id":"4d9f0d0e8f0fbd10","trace_flags":"01","resource.span.name":"_secondarySyncFromPrimary","resource.span.links":[],"resource.span.attributed":{"code.filepath":"/usr/src/app/src/services/sync/secondarySyncFromPrimary.ts","code.function":"_secondarySyncFromPrimary","spid":0,"endpoint":"http://cn2_creator-node_1:4001","result":"abort_sync_in_progress","mode":"default","abort":"Cannot change state of wallet 0xc3d1d7559356aac64ba2921ec266ce294dcdc981. Node sync currently in progress"},"resource.service.name":"content-node","resource.service.spid":0,"resource.service.endpoint":"http://cn2_creator-node_1:4001","logLevel":"warn"}

redis:

127.0.0.1:6379> keys PRIMARY*
(empty list or set)

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

Monitor SecondarySyncHealthTracker logs

Copy link
Contributor

@theoilie theoilie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@vicky-g vicky-g merged commit 3cafe9d into main Nov 30, 2022
@vicky-g vicky-g deleted the vg-ssht-ignore-aborts branch November 30, 2022 21:04
theoilie pushed a commit that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants