diff --git a/source/includes/note-partition-relationships.rst b/source/includes/note-partition-relationships.rst index 6a2bad2fe..416a6f881 100644 --- a/source/includes/note-partition-relationships.rst +++ b/source/includes/note-partition-relationships.rst @@ -4,6 +4,5 @@ :ref:`Partition-Based Sync `, an object can only have a relationship with other objects *in the same partition*. The objects can exist in different databases and collections (within the same cluster) as - long as the partition key value matches. To understand how partitions can - span multiple databases and collections, see :ref:``. + long as the partition key value matches. \ No newline at end of file diff --git a/source/logs/sync.txt b/source/logs/sync.txt index 07be23514..bdc271c47 100644 --- a/source/logs/sync.txt +++ b/source/logs/sync.txt @@ -93,7 +93,3 @@ Fields * - Platform Version - The version of the platform that sent the request. - - * - Partition - - If using :ref:`Partition-Based Sync `, which - :ref:`partition ` changed as a result of the operation. diff --git a/source/reference/partition-based-sync.txt b/source/reference/partition-based-sync.txt index 680023db5..5d4e50554 100644 --- a/source/reference/partition-based-sync.txt +++ b/source/reference/partition-based-sync.txt @@ -80,7 +80,9 @@ value passed in from the client application. } catch (err) { console.error("failed to open realm", err.message); } - + +Device Sync requires MongoDB Atlas clusters to run specific versions of MongoDB. +Partition-Based Sync requires MongoDB 4.4.0 or greater. Key Terms --------- @@ -825,6 +827,8 @@ before and after it's modified. Permission Strategies ~~~~~~~~~~~~~~~~~~~~~ +.. include:: /includes/note-partition-relationships.rst + You can structure your read and write permission expressions as a set of permission strategies that apply to your :ref:`partition strategy `. The following strategies outline common approaches that @@ -1679,6 +1683,30 @@ terminating and re-enabling Device Sync will trigger a client reset. To learn more about handling client resets, read the :ref:`client reset ` documentation. +.. _partition-based-sync-errors: + +Partition-Based Sync Errors +--------------------------- + +The following errors may occur when your App uses :ref:`Partition-Based Sync +`. + +.. list-table:: + :header-rows: 1 + :widths: 35 65 + + * - Error Name + - Description + + * - ErrorIllegalRealmPath + - This error indicates that the client attempted to open a realm with a + partition value of the wrong type. For example, you might see the error + message "attempted to bind on illegal realm partition: expected partition + to have type objectId but found string". + + To recover from this error, ensure that the type of the partition value + used to open the realm matches the partition key type in your + Device Sync configuration. .. _backend-compaction: Backend Compaction diff --git a/source/reference/service-limitations.txt b/source/reference/service-limitations.txt index c44955fb8..67ebf0b07 100644 --- a/source/reference/service-limitations.txt +++ b/source/reference/service-limitations.txt @@ -207,10 +207,8 @@ are available when you connect to MongoDB through App Services, see :ref:`the CRUD & Aggregation API reference `. -Device Sync requires MongoDB Atlas clusters to run specific versions of MongoDB: - -- Partition-Based Sync requires MongoDB 4.4.0 or greater. -- Flexible Sync requires MongoDB 5.0.0 or greater. +Device Sync requires MongoDB Atlas clusters to run specific versions of MongoDB. +Flexible Sync requires MongoDB 5.0.0 or greater. .. _mongodb-service-limitations-query-options: diff --git a/source/rules/roles.txt b/source/rules/roles.txt index 1145f0ff6..07e47d3cf 100644 --- a/source/rules/roles.txt +++ b/source/rules/roles.txt @@ -28,10 +28,6 @@ applies. For examples of how you might configure permissions for common scenarios with Device Sync, see the :ref:`flexible-sync-permissions-guide`. -If you're using the older Partition-Based Device Sync, roles work differently. -To configure Partition-Based Sync permissions, see -:ref:`partition-based-sync-permissions`. - What are Permissions? ~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/rules/sync-compatibility.txt b/source/rules/sync-compatibility.txt index 9528f185f..e0653778c 100644 --- a/source/rules/sync-compatibility.txt +++ b/source/rules/sync-compatibility.txt @@ -13,10 +13,6 @@ Device Sync-Compatible Permissions When using :ref:`Device Sync (Flexible Mode) `, there are special considerations when using the permissions system. -The older Partition-Based Sync uses a completely different permissions system. -See :ref:`partition-based-rules-and-permissions` if you are using -Partition-Based Sync. - For a guide to setting up Flexible Sync with common permissions models, see the :ref:`flexible-sync-permissions-guide`. @@ -210,6 +206,3 @@ For reference, the following changes take place in the migration: "insert": true, "delete": true, "search": true - -This does not apply to apps using Partition-Based Sync. Their permissions -configuration remains in the Sync configuration. diff --git a/source/schemas/relationships.txt b/source/schemas/relationships.txt index b461c53c8..34621c609 100644 --- a/source/schemas/relationships.txt +++ b/source/schemas/relationships.txt @@ -26,8 +26,6 @@ relationships in synced SDK data models and GraphQL operations by replacing the values in a source field with the foreign documents that they reference. -.. include:: /includes/note-partition-relationships.rst - Relationships are unidirectional and don't enforce uniqueness or other foreign key constraints. If you reference a non-existent foreign value in a source field, App Services automatically omits the reference from resolved diff --git a/source/sync/configure/enable-sync.txt b/source/sync/configure/enable-sync.txt index d27af18fe..e5c41fe43 100644 --- a/source/sync/configure/enable-sync.txt +++ b/source/sync/configure/enable-sync.txt @@ -35,9 +35,6 @@ If you're re-enabling Device Sync after pausing or terminating it, refer to :ref:`Resume ` or :ref:`Re-Enable ` Device Sync. -If you are using the older Partition-Based Sync mode, refer to -:ref:`alter-partition-based-sync-config`. - .. tip:: Device Sync pauses automatically after {+sync-inactive-app-pause-time+} diff --git a/source/sync/configure/pause-or-terminate-sync.txt b/source/sync/configure/pause-or-terminate-sync.txt index 71c3d1a94..0523d4319 100644 --- a/source/sync/configure/pause-or-terminate-sync.txt +++ b/source/sync/configure/pause-or-terminate-sync.txt @@ -211,7 +211,6 @@ terminate and re-enable Device Sync under a few different circumstances: - An :manual:`oplog ` rollover - A paused Device Sync session on a shared tier cluster due to infrequent usage - Troubleshooting, at the request of MongoDB Support -- Altering a Partition-Based Sync configuration - Switching between Sync modes. For instance, if you are switching from Partition-Based Sync to Flexible Sync - Dropping a collection you've used with Sync. For example, if you have a ``Team`` collection that stores and syncs ``Team`` objects, and diff --git a/source/sync/configure/sync-settings.txt b/source/sync/configure/sync-settings.txt index af784f88d..896556114 100644 --- a/source/sync/configure/sync-settings.txt +++ b/source/sync/configure/sync-settings.txt @@ -24,8 +24,10 @@ Sync Type ~~~~~~~~~ Atlas Device Sync has two sync modes: Flexible Sync and the older -Partition-Based Sync. We recommend using Flexible Sync. For information about -Partition-Based Sync, refer to :ref:`partition-based-sync`. +Partition-Based Sync. Partition-Based Sync has +been deprecated and is disallowed for new Sync configurations. If you have +an existing app that uses Partition-Based Sync, you can migrate +to Flexible Sync. For more information, refer to :ref:`realm-sync-migrate-modes`. Flexible Sync lets you define a query in the client and sync only the objects that match the query. With client-side subscriptions, client applications can: @@ -451,8 +453,7 @@ directory of an :ref:`exported ` app: └── config.json For example, the following Sync configuration applies to apps using Flexible -Sync (recommended). If you are using the older Partition-Based Sync, refer to -:ref:`partition-based-sync-config-object`. +Sync. .. code-block:: json :caption: sync/config.json diff --git a/source/sync/error-handling/errors.txt b/source/sync/error-handling/errors.txt index 5e09cbb99..213068829 100644 --- a/source/sync/error-handling/errors.txt +++ b/source/sync/error-handling/errors.txt @@ -80,31 +80,6 @@ errors and how to handle them. Atlas App Services reports errors in your specific error. For example, this might occur when you hit the storage limit of a free tier Atlas cluster. -.. _partition-based-sync-errors: - -Partition-Based Sync Errors -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following errors may occur when your App uses :ref:`Partition-Based Sync -`. - -.. list-table:: - :header-rows: 1 - :widths: 35 65 - - * - Error Name - - Description - - * - ErrorIllegalRealmPath - - This error indicates that the client attempted to open a realm with a - partition value of the wrong type. For example, you might see the error - message "attempted to bind on illegal realm partition: expected partition - to have type objectId but found string". - - To recover from this error, ensure that the type of the partition value - used to open the realm matches the partition key type in your - Device Sync configuration. - .. _flexible-sync-errors: Flexible Sync Errors diff --git a/source/sync/get-started.txt b/source/sync/get-started.txt index ef2bbf276..206b3b61d 100644 --- a/source/sync/get-started.txt +++ b/source/sync/get-started.txt @@ -30,9 +30,7 @@ Before You Start M0 cluster to explore and develop your app. We recommend that you use a dedicated tier cluster (M10 and above) for production applications. You cannot use sync with a :ref:`serverless instance ` or - :ref:`{+adf-instance+} `. :ref:`Partition-Based Sync - `, requires a MongoDB Atlas cluster that runs MongoDB - version 4.4 or later. + :ref:`{+adf-instance+} `. - If you don't already have one, :ref:`create a new App ` linked to your Atlas cluster. @@ -114,12 +112,6 @@ Define Data Access Patterns Once you have decided on your app's data model, you can define a data access pattern and access rules for your app's data. -Choose a Sync Mode -~~~~~~~~~~~~~~~~~~ - -There are two Sync Modes: Flexible Sync and the older Partition-Based Sync. We -recommend you use Flexible Sync. - Client applications can query the queryable fields of a document to determine which objects to sync. Then, App Services applies rules and default roles to determine whether users can read or write the objects that match the query. diff --git a/source/sync/go-to-production/optimize-sync-atlas-usage.txt b/source/sync/go-to-production/optimize-sync-atlas-usage.txt index b94e51787..347d1f8ee 100644 --- a/source/sync/go-to-production/optimize-sync-atlas-usage.txt +++ b/source/sync/go-to-production/optimize-sync-atlas-usage.txt @@ -43,12 +43,6 @@ When you set a client maximum offline time in an App that uses :ref:`Flexible Sync `, **trimming** deletes changes older than the client maximum offline time. -.. note:: - - Flexible Sync uses :ref:`trimming ` to reduce Device Sync history - stored in Atlas. Partition-Based Sync uses :ref:`backend compaction - `. - .. _client-maximum-offline-time: Client Maximum Offline Time