Skip to content

Conversation

antoniofilipovic
Copy link
Contributor

@antoniofilipovic antoniofilipovic commented Mar 1, 2024

This PR enables the cluster to continue executing if the MAIN is behind REPLICA. It can happen in the scenario as in the test case, or when one of the tenants on other REPLICA is behind MAIN's tenant. In both cases, the result is the same -> force sync of tenant with MAIN's tenant.

This is as agreed in user story for 2.15/2.16 -> Link here

[master < Task] PR

  • Check, and update documentation if necessary
  • Provide the full content or a guide for the final git message

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses
  • Tag someone from docs team in the comments
@antoniofilipovic antoniofilipovic self-assigned this Mar 1, 2024
@antoniofilipovic antoniofilipovic force-pushed the force-sync-replicas branch 2 times, most recently from f807508 to c70fe72 Compare March 1, 2024 12:39
@antoniofilipovic antoniofilipovic changed the title Add force sync replica with master Add force sync replica with MAIN Mar 1, 2024
@antoniofilipovic antoniofilipovic marked this pull request as ready for review March 1, 2024 15:56
@antoniofilipovic antoniofilipovic changed the title Add force sync replica with MAIN Add force sync REPLICA with MAIN Mar 1, 2024
@antoniofilipovic antoniofilipovic added this to the mg-v2.16.0 milestone Mar 1, 2024
@antoniofilipovic antoniofilipovic added the Docs needed Docs needed label Mar 1, 2024
@andrejtonev
Copy link
Contributor

General question about the scheme; why do we care about epochs? Shouldn't everyone have the same history? If the epoch do not align, then we have a branching point and the two instances cannot continue as part of the same cluster.
I understand that we might decide to delete data in that case. But I still do not understand why we care about epoch even in this case.
We care about who has the highest timestamp.
In case we have a branching point we might care about minimizing the differences. Not sure about this either. We should prioritize deleting the least amount of data. Timestamps don't exactly correlate with "amount of data" but should be enough at this point.

Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

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

First pass. A few comments.

@as51340
Copy link
Contributor

as51340 commented Mar 5, 2024

I will leave this one to Andreja to handle it, high-level looks good to me

@antoniofilipovic
Copy link
Contributor Author

General question about the scheme; why do we care about epochs? Shouldn't everyone have the same history? If the epoch do not align, then we have a branching point and the two instances cannot continue as part of the same cluster. I understand that we might decide to delete data in that case. But I still do not understand why we care about epoch even in this case. We care about who has the highest timestamp. In case we have a branching point we might care about minimizing the differences. Not sure about this either. We should prioritize deleting the least amount of data. Timestamps don't exactly correlate with "amount of data" but should be enough at this point.

We synced about this. So the issue was that the Notion page was out of sync. I don't deal with epochs here.

Copy link
Contributor

@andrejtonev andrejtonev left a comment

Choose a reason for hiding this comment

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

Looks good!

@antoniofilipovic antoniofilipovic enabled auto-merge (squash) March 5, 2024 15:39
@antoniofilipovic antoniofilipovic merged commit d4d4660 into master Mar 5, 2024
@antoniofilipovic antoniofilipovic deleted the force-sync-replicas branch March 5, 2024 16:51
@antoniofilipovic
Copy link
Contributor Author

@kgolubic tagging you here:
RN: In case REPLICA diverges from MAIN, MAIN will force reset data on REPLICA instance

@antoniofilipovic
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs needed Docs needed

4 participants