Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Conversation

@ltran-mdb2
Copy link
Collaborator

@ltran-mdb2 ltran-mdb2 commented Nov 13, 2024

DESCRIPTION

Adds tutorial on reversing sync

STAGING

https://deploy-preview-481--docs-cluster-to-cluster-sync.netlify.app/reverse-sync/
https://deploy-preview-481--docs-cluster-to-cluster-sync.netlify.app/reference/api/reverse/
https://deploy-preview-481--docs-cluster-to-cluster-sync.netlify.app/topologies/multiple-mongosyncs/#reverse-the-synchronization-direction
https://deploy-preview-481--docs-cluster-to-cluster-sync.netlify.app/reference/cutover-process/

JIRA

https://jira.mongodb.org/browse/DOCSP-45263

SELF-REVIEW CHECKLIST

  • Does each file have 3-5 taxonomy facet tags?
    See the taxonomy tagging instructions and this example PR
  • Is this free of any warnings or errors in the RST?
  • Is this free of spelling errors?
  • Is this free of grammatical errors?
  • Is this free of staging / rendering issues?
  • Are all the links working?

EXTERNAL REVIEW REQUIREMENTS

What's expected of an external reviewer?

@netlify
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for docs-cluster-to-cluster-sync ready!

Name Link
🔨 Latest commit 559f690
🔍 Latest deploy log https://app.netlify.com/sites/docs-cluster-to-cluster-sync/deploys/67570cac3fcd270008375823
😎 Deploy Preview https://deploy-preview-481--docs-cluster-to-cluster-sync.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@jmd-mongo jmd-mongo left a comment

Choose a reason for hiding this comment

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

Thanks for you work on this, @ltran-mdb2! This is a great start. I've left some comments and questions for you.

Thanks,
Joe

.. procedure::
:style: normal

.. step:: Verify the status of the ``mongosync`` process.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[comment]

I think we can remove the styling backticks around mongosync in this title.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!


- ``lagTimeSeconds`` is small (near ``0``).

If ``lagTimeSeconds`` isn't close to ``0`` when the cutover
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question]

Can we get more specific about how close?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will check in with the tech reviewer on this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ajayvijayakumar123 do you have more information on this?

Copy link
Collaborator

@ajayvijayakumar123 ajayvijayakumar123 Nov 21, 2024

Choose a reason for hiding this comment

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

I'm not sure if we have a better recommendation to give. I think for now this should be sufficient


.. step:: Stop any write operations to the synced collections on the source.

- If you started ``mongosync`` with ``enableUserWriteBlocking``
Copy link
Collaborator

Choose a reason for hiding this comment

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

[tense]

Update to present tense. "If you start...".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

- If you started ``mongosync`` with ``enableUserWriteBlocking``
set to ``true``, ``mongosync`` blocks all write operations on
the entire source cluster during the commit (step 4) for you.
- If you didn't start ``mongosync`` with
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar comment as above re tense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!


.. step:: Send a :ref:`commit <c2c-api-commit>` request to ``mongosync``.

If you started multiple ``mongosync`` instances for your
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar comments as above re tense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!


Call the ``reverse`` endpoint to reverse the direction of your sync
operation. Your original source cluster becomes your new destination cluster
and vice versa.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[suggestion]

Consider rewording this. I don't think we want to use "vice versa" or other latin terms in the docs unless totally necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@ltran-mdb2
Copy link
Collaborator Author

Thanks for your feedback @jmd-mongo ! This should be ready for another review.

@ltran-mdb2 ltran-mdb2 requested a review from jmd-mongo November 14, 2024 16:12
Copy link
Collaborator

@jmd-mongo jmd-mongo left a comment

Choose a reason for hiding this comment

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

Thanks for these updates, @ltran-mdb2! This one LGTM at this point.

Thanks,
Joe

Copy link
Collaborator

@ajayvijayakumar123 ajayvijayakumar123 left a comment

Choose a reason for hiding this comment

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

A couple of questions!

Copy link
Collaborator

@ajayvijayakumar123 ajayvijayakumar123 left a comment

Choose a reason for hiding this comment

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

LGTM! Checking if @mvankeulen94 has any comments

Copy link

@mvankeulen94 mvankeulen94 left a comment

Choose a reason for hiding this comment

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

thanks! a few notes from my end

- If ``mongosync`` uses filtered sync, it's not necessary to
disable writes to the entire source cluster. However, you must ensure
that you stop write operations for the collections that the
filter includes.

Choose a reason for hiding this comment

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

Can we remove this bullet since filtered sync isn't supported with reverse mode? CC @ajayvijayakumar123

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fair point. I initially made the suggestion to consolidate the common steps between the reverse and commit pages. If we want to only include the note about filtered sync on the commit page, I think we'd need to do a bit of tweaking. I imagine we can remove this note out of the common commit-process page and only add it for the commit process page.

Alternatively, we could just make the reverse sync tutorial be something like:

  1. follow the steps from the cutover process tutorial.
  2. Call the reverse endpoint to reverse the direction of your sync operation ... mongosync replicates all writes that you performed on your new source cluster after you unblocked writes to the new destination cluster.

That way we would just have the cutover steps on the cutover tutorial. I think I'm in favor of this option now. (Apologies for the back and forth). @ltran-mdb2 @mvankeulen94 thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alternatively, we could just make the reverse sync tutorial be something like:

  1. follow the steps from the cutover process tutorial.
  2. Call the reverse endpoint to reverse the direction of your sync operation ... mongosync replicates all writes that you performed on your new source cluster after you unblocked writes to the new destination cluster.

That way we would just have the cutover steps on the cutover tutorial. I think I'm in favor of this option now. (Apologies for the back and forth). @ltran-mdb2 @mvankeulen94 thoughts?

I think this setup makes sense and am also in favor of this for clarity + minimalism. @mvankeulen94 does this work for you?

Choose a reason for hiding this comment

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

sgtm!

:copyable: false
:emphasize-lines: 5, 8

.. step:: Stop any write operations to the synced collections on the source.

Choose a reason for hiding this comment

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

Can we clarify how this tutorial compares with the Finalize Cutover Process tutorial? It'd be helpful given the overlap between these two

Copy link
Collaborator

Choose a reason for hiding this comment

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

just to add a bit more info - the major differences are:

  • reverse requires write blocking
  • reverse does not work with filtered sync

besides that, steps 1-7 should be the exactly same

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we move forward with linking to the cutover process, I will add these considerations to the reverse sync page

:class: singlecol
:depth: 1

To reverse the direction of a sync operation, use the following

Choose a reason for hiding this comment

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

it'd be helpful to add a note on why one might use reverse. E.g., the note we have here https://www.mongodb.com/docs/cluster-to-cluster-sync/current/reference/mongosync/mongosync-behavior/#considerations-for-continuous-sync

@ltran-mdb2
Copy link
Collaborator Author

Hi @ajayvijayakumar123 and @mvankeulen94 thanks for all your feedback! I updated the PR based on our discussion - could you take another look when you get a chance?

@ajayvijayakumar123 ajayvijayakumar123 self-requested a review December 6, 2024 21:53
Copy link
Collaborator

@ajayvijayakumar123 ajayvijayakumar123 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@mvankeulen94 mvankeulen94 left a comment

Choose a reason for hiding this comment

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

lgtm!

@ltran-mdb2 ltran-mdb2 merged commit 14a154a into mongodb:v1.9 Dec 9, 2024
4 checks passed
ltran-mdb2 added a commit to ltran-mdb2/docs-cluster-to-cluster-sync that referenced this pull request Dec 9, 2024
* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263 copy edits

* DOCSP-45263 copy edits

* DOCSP-45263 adding note on multiple mongosyncs page

* DOCSP-45263 tech edit

* DOCSP-45263 tech edit

* DOCSP-45263 linking reverse to cutover
ltran-mdb2 added a commit that referenced this pull request Dec 9, 2024
* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263 copy edits

* DOCSP-45263 copy edits

* DOCSP-45263 adding note on multiple mongosyncs page

* DOCSP-45263 tech edit

* DOCSP-45263 tech edit

* DOCSP-45263 linking reverse to cutover
ltran-mdb2 added a commit to ltran-mdb2/docs-cluster-to-cluster-sync that referenced this pull request Dec 9, 2024
* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263 copy edits

* DOCSP-45263 copy edits

* DOCSP-45263 adding note on multiple mongosyncs page

* DOCSP-45263 tech edit

* DOCSP-45263 tech edit

* DOCSP-45263 linking reverse to cutover
ltran-mdb2 added a commit that referenced this pull request Dec 9, 2024
* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263-adding-reverse-tutorial

* DOCSP-45263 copy edits

* DOCSP-45263 copy edits

* DOCSP-45263 adding note on multiple mongosyncs page

* DOCSP-45263 tech edit

* DOCSP-45263 tech edit

* DOCSP-45263 linking reverse to cutover
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants