This repository was archived by the owner on May 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
DOCSP-46854-migrate-pqs-tutorial #580
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b4f2bb8
DOCSP-46854-migrate-pqs-tutorial
ltran-mdb2 8dbdf05
DOCSP-46854-migrate-pqs-tutorial
ltran-mdb2 23e47cb
DOCSP-46854-migrate-pqs-tutorial
ltran-mdb2 85a2954
DOCSP-46854-migrate-pqs-tutorial
ltran-mdb2 9f104b8
DOCSP-46854-migrate-pqs-tutorial
ltran-mdb2 50b8f83
DOCSP-46854 tech edits
ltran-mdb2 82a7203
DOCSP-46854 tech edits
ltran-mdb2 f2a5578
DOCSP-46854 fixing build
ltran-mdb2 7e9c326
Merge branch 'master' into DOCSP-46854
ltran-mdb2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.. _c2c-migrate-pqs: | ||
|
||
================================= | ||
Migrate Persistent Query Settings | ||
================================= | ||
|
||
.. default-domain:: mongodb | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 2 | ||
:class: singlecol | ||
|
||
If your source cluster uses Persistent Query Settings (PQS), you must manually | ||
migrate those settings to your destination cluster to finalize sync. | ||
|
||
``mongosync`` checks for PQS during initialization and the :ref:`cutover process | ||
<c2c-cutover-process>`. If ``mongosync`` finds PQS on the source cluster during | ||
cutover, {+c2c-product-name+} shows a warning. Use the following procedure to | ||
address the warning and migrate your PQS to your destination cluster. | ||
|
||
Steps | ||
----- | ||
|
||
.. procedure:: | ||
:style: normal | ||
|
||
.. step:: Export your Persistent Query Settings. | ||
|
||
Run the following code block to output your query settings into an array: | ||
|
||
.. code-block:: shell | ||
|
||
mongosh --eval | ||
'console.log(db.aggregate([{$querySettings:{}}]).toArray())' | ||
|
||
.. step:: Import your PQS to the destination cluster. | ||
|
||
For each query setting that you want to migrate, use | ||
:dbcommand:`setQuerySettings` to apply that setting to your destination | ||
cluster. | ||
|
||
If the query setting includes a ``representativeQuery`` field value, use | ||
that field value as the ``setQuerySettings`` value. | ||
|
||
Otherwise, use the ``queryShapeHash`` field value from the | ||
``querySettings`` array as the ``setQuerySettings`` value. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Denis Grebennicov should also review this.