From b4f2bb82944165f4eae367dbc78d5a4e3c68653c Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Mon, 3 Feb 2025 11:16:50 -0500 Subject: [PATCH 1/8] DOCSP-46854-migrate-pqs-tutorial --- snooty.toml | 3 +- source/reference/c2c-migrate-pqs.txt | 52 ++++++++++++++++++++++++++++ source/reference/cutover-process.txt | 5 +++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 source/reference/c2c-migrate-pqs.txt diff --git a/snooty.toml b/snooty.toml index e73491c02..313d38d34 100644 --- a/snooty.toml +++ b/snooty.toml @@ -23,7 +23,8 @@ toc_landing_pages = ["/quickstart", "/faq", "/reference/collection-level-filtering", "/reference/verification", - "/reference/mongosync" + "/reference/mongosync", + "/reference/cutover-process" ] [constants] diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt new file mode 100644 index 000000000..feed4665a --- /dev/null +++ b/source/reference/c2c-migrate-pqs.txt @@ -0,0 +1,52 @@ +.. _c2c-migrate-pqs: + +================================= +Migrate Persistent Query Settings +================================= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :class: singlecol + :depth: 1 + +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 the :ref:`cutover +process `. If ``mongosync`` finds PQS on the source +cluster, {+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 export your query settings into an array called ``querySettings``: + + .. code-block:: shell + + mongosh --eval 'console.log(db.aggregate([{$querySettings:{}}]).toArray())' + + .. step::(Optional) Remove unwanted settings. + + If your source cluster contains query settings that you do not want to migrate to your destination cluster, remove those settings from your ``querySettings`` array. + + .. step::(Optional) Import your PQS to the desination cluster. + + For each query setting in your ``querySettings`` array, use + :dbcommand:`setQuerySettings` to apply that setting to your destination + cluster. + + If the query setting includes a ``representativeQuery`` field, use that field value as the ``setQuerySettings`` value. + + Otherwise, use the ``queryShapeHas`` field value from the + ``querySettings`` array as the ``setQuerySettings`` value. + diff --git a/source/reference/cutover-process.txt b/source/reference/cutover-process.txt index 1b0f52aed..a88542ceb 100644 --- a/source/reference/cutover-process.txt +++ b/source/reference/cutover-process.txt @@ -221,3 +221,8 @@ Learn More - :ref:`c2c-api-progress` - :ref:`c2c-states` +.. toctree:: + :titlesonly: + + Migrate Persistent Query Settings + From 8dbdf05b487d2f64f4cf8a3ae79727700ebe1a4f Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Mon, 3 Feb 2025 11:31:35 -0500 Subject: [PATCH 2/8] DOCSP-46854-migrate-pqs-tutorial --- source/reference/cutover-process.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/cutover-process.txt b/source/reference/cutover-process.txt index a88542ceb..a932c7482 100644 --- a/source/reference/cutover-process.txt +++ b/source/reference/cutover-process.txt @@ -224,5 +224,5 @@ Learn More .. toctree:: :titlesonly: - Migrate Persistent Query Settings + Migrate Persistent Query Settings From 23e47cbec0922c29b694893de4527ae151cc607d Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Mon, 3 Feb 2025 11:37:13 -0500 Subject: [PATCH 3/8] DOCSP-46854-migrate-pqs-tutorial --- source/reference/c2c-migrate-pqs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index feed4665a..a5a2e6b2a 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -35,11 +35,11 @@ Steps mongosh --eval 'console.log(db.aggregate([{$querySettings:{}}]).toArray())' - .. step::(Optional) Remove unwanted settings. + .. step:: (Optional) Remove unwanted settings. If your source cluster contains query settings that you do not want to migrate to your destination cluster, remove those settings from your ``querySettings`` array. - .. step::(Optional) Import your PQS to the desination cluster. + .. step:: (Optional) Import your PQS to the desination cluster. For each query setting in your ``querySettings`` array, use :dbcommand:`setQuerySettings` to apply that setting to your destination From 85a2954c8f1f04b42d2eb60b6222845aaff364ab Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Mon, 3 Feb 2025 13:56:33 -0500 Subject: [PATCH 4/8] DOCSP-46854-migrate-pqs-tutorial --- source/reference/c2c-migrate-pqs.txt | 6 +++--- source/reference/cutover-process.txt | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index a5a2e6b2a..270f1708d 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -39,14 +39,14 @@ Steps If your source cluster contains query settings that you do not want to migrate to your destination cluster, remove those settings from your ``querySettings`` array. - .. step:: (Optional) Import your PQS to the desination cluster. + .. step:: Import your PQS to the desination cluster. For each query setting in your ``querySettings`` array, use :dbcommand:`setQuerySettings` to apply that setting to your destination cluster. - If the query setting includes a ``representativeQuery`` field, use that field value as the ``setQuerySettings`` value. + If the query setting includes a ``representativeQuery`` field value, use that field value as the ``setQuerySettings`` value. - Otherwise, use the ``queryShapeHas`` field value from the + Otherwise, use the ``queryShapeHash`` field value from the ``querySettings`` array as the ``setQuerySettings`` value. diff --git a/source/reference/cutover-process.txt b/source/reference/cutover-process.txt index a932c7482..1e6a63451 100644 --- a/source/reference/cutover-process.txt +++ b/source/reference/cutover-process.txt @@ -120,7 +120,10 @@ Steps to ensure that the ``mongosync`` state is ``COMMITTING`` or ``COMMITTED``. - Once you complete this step, ``mongosync`` blocks writes on the source cluster. + Once you complete this step, ``mongosync`` blocks writes on the source + cluster. + + If your source cluster contains Persistant Query Settings (PQS), you must :ref:`manually migrate PQS ` at this point in the cutover process. .. step:: Wait until you can perform writes on the destination cluster. From 9f104b80b06fb3221499dd53ca349ee0152bbe63 Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Mon, 3 Feb 2025 14:48:24 -0500 Subject: [PATCH 5/8] DOCSP-46854-migrate-pqs-tutorial --- source/reference/c2c-migrate-pqs.txt | 34 ++++++++++++++-------------- source/reference/cutover-process.txt | 3 ++- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index 270f1708d..7b4132bd4 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -1,51 +1,51 @@ .. _c2c-migrate-pqs: -================================= +================================= Migrate Persistent Query Settings ================================= .. default-domain:: mongodb .. contents:: On this page - :local: - :backlinks: none - :class: singlecol - :depth: 1 + :local: :backlinks: none :class: singlecol :depth: 1 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 the :ref:`cutover -process `. If ``mongosync`` finds PQS on the source -cluster, {+c2c-product-name+} shows a warning. Use the following -procedure to address the warning and migrate your PQS to your -destination cluster. +``mongosync`` checks for PQS during the :ref:`cutover process +`. If ``mongosync`` finds PQS on the source cluster, +{+c2c-product-name+} shows a warning. Use the following procedure to address the +warning and migrate your PQS to your destination cluster. -Steps ------ +Steps ----- .. procedure:: :style: normal .. step:: Export your Persistent Query Settings. - Run the following code block to export your query settings into an array called ``querySettings``: + Run the following code block to export your query settings into an array + called ``querySettings``: .. code-block:: shell - mongosh --eval 'console.log(db.aggregate([{$querySettings:{}}]).toArray())' + mongosh --eval + 'console.log(db.aggregate([{$querySettings:{}}]).toArray())' .. step:: (Optional) Remove unwanted settings. - If your source cluster contains query settings that you do not want to migrate to your destination cluster, remove those settings from your ``querySettings`` array. + If your source cluster contains query settings that you do not want to + migrate to your destination cluster, remove those settings from your + ``querySettings`` array. - .. step:: Import your PQS to the desination cluster. + .. step:: Import your PQS to the destination cluster. For each query setting in your ``querySettings`` array, 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. + 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. diff --git a/source/reference/cutover-process.txt b/source/reference/cutover-process.txt index 1e6a63451..e47ecde78 100644 --- a/source/reference/cutover-process.txt +++ b/source/reference/cutover-process.txt @@ -123,7 +123,8 @@ Steps Once you complete this step, ``mongosync`` blocks writes on the source cluster. - If your source cluster contains Persistant Query Settings (PQS), you must :ref:`manually migrate PQS ` at this point in the cutover process. + If your source cluster contains Persistant Query Settings (PQS), you must + :ref:`manually migrate PQS ` to your destination cluster. .. step:: Wait until you can perform writes on the destination cluster. From 50b8f83402f0209978e02fa2a920986f361306fe Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Wed, 5 Feb 2025 15:59:53 -0500 Subject: [PATCH 6/8] DOCSP-46854 tech edits --- source/reference/c2c-migrate-pqs.txt | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index 7b4132bd4..71cfef4e9 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -12,35 +12,30 @@ Migrate Persistent Query Settings 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 the :ref:`cutover process -`. If ``mongosync`` finds PQS on the source cluster, -{+c2c-product-name+} shows a warning. Use the following procedure to address the -warning and migrate your PQS to your destination cluster. +``mongosync`` checks for PQS during the ``mongosync`` initialization and the +:ref:`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 ----- +Steps +----- .. procedure:: :style: normal .. step:: Export your Persistent Query Settings. - Run the following code block to export your query settings into an array - called ``querySettings``: + 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:: (Optional) Remove unwanted settings. - - If your source cluster contains query settings that you do not want to - migrate to your destination cluster, remove those settings from your - ``querySettings`` array. - .. step:: Import your PQS to the destination cluster. - For each query setting in your ``querySettings`` array, use + For each query setting that you want to migrate, use :dbcommand:`setQuerySettings` to apply that setting to your destination cluster. From 82a7203b42ae2cadf70a506e07d3e50e45b602ee Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Wed, 5 Feb 2025 16:05:27 -0500 Subject: [PATCH 7/8] DOCSP-46854 tech edits --- source/reference/c2c-migrate-pqs.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index 71cfef4e9..b24c6de9f 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -12,11 +12,10 @@ Migrate Persistent Query Settings 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 the ``mongosync`` initialization and the -:ref:`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. +``mongosync`` checks for PQS during initialization and the :ref:`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 ----- From f2a55786704fdac608d3fee2e4fb0f540aae0e0a Mon Sep 17 00:00:00 2001 From: Lauren Tran Date: Thu, 6 Feb 2025 13:31:53 -0500 Subject: [PATCH 8/8] DOCSP-46854 fixing build --- source/reference/c2c-migrate-pqs.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/reference/c2c-migrate-pqs.txt b/source/reference/c2c-migrate-pqs.txt index b24c6de9f..3ad288f73 100644 --- a/source/reference/c2c-migrate-pqs.txt +++ b/source/reference/c2c-migrate-pqs.txt @@ -7,7 +7,10 @@ Migrate Persistent Query Settings .. default-domain:: mongodb .. contents:: On this page - :local: :backlinks: none :class: singlecol :depth: 1 + :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.