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

CON-482 Prioritize force wipe syncs #4185

Merged
merged 1 commit into from
Oct 26, 2022
Merged

Conversation

SidSethi
Copy link
Contributor

@SidSethi SidSethi commented Oct 26, 2022

Description

  1. orphaned data queue should enqueue syncs to front (via mergePrimaryAndSecondaryController)
  2. recurring sync queue should enqueue to front
  3. processSync queue should process at front
  4. immediate recurring queue does not ever use forceWipe so no changes needed there

Tests

Manually tested with local e2e:

  1. A seed create-user
  2. Confirmed no recurring syncs issued, and replica set created + synced
  3. Called POST <primary>/manually_update_replica_set and changed 1 secondary
  4. Confirmed that primary queue executed merge_primary sync job with forceWipe = true and lifo: true (see below)

Screen Shot 2022-10-26 at 1 28 35 PM

5. Confirmed other sync jobs with forceWipe not set do not use lifo: true 6. Confirmed new secondary received `sync-processing-queue` jobs with `lifo: false` and correctly synced 7. Confirmed old secondary received `sync-processing-queue` job to forceWipe with lifo:true and correctly executed (see below)
{
  "data": {
    "wallet": "0x796b685350441401c2c7e3ce2b393027e783529a",
    "creatorNodeEndpoint": "http://cn1_creator-node_1:4000",
    "forceResyncConfig": {
      "forceResync": false,
      "signatureData": {
        "timestamp": "2022-10-26T17:26:06.006Z",
        "signature": "0xb926e9621e1fe229e7456ca75cb37db3f3cad3a38204c3684fd3100abbded91d58c837d1a165096d7fd58dc167a4cb25e382dbc571e23548407ad7ded7ef56851c",
        "data": {
          "wallet": [
            "0x796b685350441401c2c7e3ce2b393027e783529a"
          ],
          "creator_node_endpoint": "http://cn1_creator-node_1:4000",
          "sync_type": "RECURRING"
        }
      },
      "wallet": "0x796b685350441401c2c7e3ce2b393027e783529a"
    },
    "forceWipe": true,
    "logContext": {
      "requestID": "2FBQRUJeA",
      "requestMethod": "POST",
      "requestHostname": "cn2_creator-node_1",
      "requestUrl": "/sync"
    },
    "parentSpanContext": {
      "traceId": "abb15b732c38552c777b57e16f334468",
      "spanId": "459cadb5f5cdb368",
      "traceFlags": 1
    },
    "syncUuid": "d14bd419-2797-4278-a96b-f71353aa9bf6"
  },
  "returnValue": {
    "result": "success_force_wipe"
  }
}

Screen Shot 2022-10-26 at 1 31 31 PM

Screen Shot 2022-10-26 at 1 31 45 PM

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

Monitor recurring-sync-queue and sync-processing-queue jobs with forceWipe = true and lifo = true

@SidSethi SidSethi merged commit c88bdf8 into main Oct 26, 2022
@SidSethi SidSethi deleted the ss-prioritize-forcewipe-sync branch October 26, 2022 17:33
dmanjunath pushed a commit that referenced this pull request Oct 31, 2022
@AudiusProject AudiusProject deleted a comment from linear bot Sep 11, 2023
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

2 participants