From 4301cb81f79aa7a3bafc31c8ba672b2670b18171 Mon Sep 17 00:00:00 2001 From: JP Hwang Date: Fri, 11 Oct 2024 23:27:48 +0100 Subject: [PATCH] Update for name changes --- _includes/code/howto/manage-data.collections.py | 12 ++++++------ _includes/code/howto/manage-data.collections.ts | 12 ++++++------ .../concepts/replication-architecture/consistency.md | 8 ++++---- developers/weaviate/configuration/replication.md | 11 +++++++---- developers/weaviate/manage-data/collections.mdx | 4 ++-- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/_includes/code/howto/manage-data.collections.py b/_includes/code/howto/manage-data.collections.py index 5ec9e341c..594579dca 100644 --- a/_includes/code/howto/manage-data.collections.py +++ b/_includes/code/howto/manage-data.collections.py @@ -492,7 +492,7 @@ client.close() # ============================================== -# ===== REPLICATION WITH ObjectDeletionConflictResolution +# ===== REPLICATION WITH DeletionStrategy # ============================================== # Connect to a setting with 3 replicas @@ -503,8 +503,8 @@ # Clean slate client.collections.delete("Article") -# START ObjectDeletionConflictResolution -from weaviate.classes.config import Configure, ObjectDeletionConflictResolution +# START DeletionStrategy +from weaviate.classes.config import Configure, DeletionStrategy client.collections.create( "Article", @@ -512,16 +512,16 @@ factor=3, async_enabled=True, # highlight-start - object_deletion_conflict_resolution=ObjectDeletionConflictResolution.PERMANENT_DELETION # Or ObjectDeletionConflictResolution.NO_AUTOMATED_RESOLUTION + deletion_strategy=DeletionStrategy.DELETE_ON_CONFLICT # Or DeletionStrategy.NO_AUTOMATED_RESOLUTION # highlight-end ) ) -# END ObjectDeletionConflictResolution +# END DeletionStrategy # Test collection = client.collections.get("Article") config = collection.config.get() -# assert config.replication_config.object_deletion_conflict_resolution == ObjectDeletionConflictResolution.PERMANENT_DELETION # Something like this for the test? +# assert config.replication_config.deletion_strategy == DeletionStrategy.DELETE_ON_CONFLICT # Something like this for the test? client.close() diff --git a/_includes/code/howto/manage-data.collections.ts b/_includes/code/howto/manage-data.collections.ts index 2f7dbf05d..99a3a246b 100644 --- a/_includes/code/howto/manage-data.collections.ts +++ b/_includes/code/howto/manage-data.collections.ts @@ -573,28 +573,28 @@ await client.collections.create({ // TODO NEEDS TEST assert.equal(result.replicationConfig.factor, 3); // ======================= -// ===== ObjectDeletionConflictResolution ==== +// ===== DeletionStrategy ==== // ======================= // /* -// // START ObjectDeletionConflictResolution +// // START DeletionStrategy // import { configure } from 'weaviate-client'; -// // END ObjectDeletionConflictResolution +// // END DeletionStrategy // */ -// // START ObjectDeletionConflictResolution +// // START DeletionStrategy // await client.collections.create({ // name: 'Article', // // highlight-start // replication: configure.replication({ // factor: 3, // asyncEnabled: true, -// objectDeletionConflictResolution: 'permanentDeletion' +// DeletionStrategy: 'permanentDeletion' // }), // // highlight-end // }) -// // END ObjectDeletionConflictResolution +// // END DeletionStrategy // ==================== // ===== SHARDING ===== diff --git a/developers/weaviate/concepts/replication-architecture/consistency.md b/developers/weaviate/concepts/replication-architecture/consistency.md index 55ead89b5..823977fcb 100644 --- a/developers/weaviate/concepts/replication-architecture/consistency.md +++ b/developers/weaviate/concepts/replication-architecture/consistency.md @@ -191,7 +191,7 @@ Async replication supplements the repair-on-read mechanism. If a node becomes in To activate async replication, set `asyncEnabled` to true in the [`replicationConfig` section of your collection definition](../../manage-data/collections.mdx#replication-settings). -### Object deletion conflict resolution +### Deletion strategy :::info Added in `v1.27` ::: @@ -202,13 +202,13 @@ This can lead to a conflict where the deleted object can still be read, or where To resolve this, you can set an option in the replication config section of each collection. -The available strategies are: +The available deletion strategies are: -- `PermanentlyDelete` - The object is deleted from all replicas. +- `DeleteOnConflict` - The object is deleted from all replicas. - `NoAutomatedResolution` - Conflicts in deletions are resolved in the same way as other conflicts. :::tip Related pages -- See [this how-to page](../../configuration/replication.md#object-deletion-conflict-resolution) for an example of how to set the object deletion conflict resolution strategy. +- See [this how-to page](../../configuration/replication.md#deletion-strategy) for an example of how to set the object deletion conflict resolution strategy. ::: ## Related pages diff --git a/developers/weaviate/configuration/replication.md b/developers/weaviate/configuration/replication.md index ba05ee9fb..8ebdb3a66 100644 --- a/developers/weaviate/configuration/replication.md +++ b/developers/weaviate/configuration/replication.md @@ -5,6 +5,10 @@ image: og/docs/configuration.jpg # tags: ['configuration', 'operations', 'monitoring', 'observability'] --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import FilteredTextBlock from '@site/src/components/Documentation/FilteredTextBlock'; + Weaviate instances can be replicated. Replication can improve read throughput, improve availability, and enable zero-downtime upgrades. For more details on how replication is designed and built in Weaviate, see [Replication Architecture](../concepts/replication-architecture/index.md). @@ -62,7 +66,7 @@ import ReplicationConfigWithAsyncRepair from '/_includes/code/configuration/repl -### Object deletion conflict resolution +### Deletion strategy import ManageDataPyCode from '!!raw-loader!/_includes/code/howto/manage-data.collections.py'; import ManageDataTSCode from '!!raw-loader!/_includes/code/howto/manage-data.collections.ts'; @@ -76,8 +80,8 @@ You can optionally set a collection option on how to resolve object deletion con @@ -89,7 +93,6 @@ You can optionally set a collection option on how to resolve object deletion con ``` - ## How to use: Queries diff --git a/developers/weaviate/manage-data/collections.mdx b/developers/weaviate/manage-data/collections.mdx index 2768f209c..d76d6c4b5 100644 --- a/developers/weaviate/manage-data/collections.mdx +++ b/developers/weaviate/manage-data/collections.mdx @@ -773,8 +773,8 @@ You can optionally set a collection option on how to resolve object deletion con