From 6c7dac388fc1b7b0c77b2b1ef3bdd1d294c31e86 Mon Sep 17 00:00:00 2001 From: Anton SHEPILOV Date: Thu, 31 Oct 2024 15:08:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9DMore=20docs=20to=20one-of=20storage?= =?UTF-8?q?=20strategy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/services/storage/oneof-storage-strategy.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tdrive/backend/node/src/core/platform/services/storage/oneof-storage-strategy.ts b/tdrive/backend/node/src/core/platform/services/storage/oneof-storage-strategy.ts index aaaa9c19..2a88cc2c 100644 --- a/tdrive/backend/node/src/core/platform/services/storage/oneof-storage-strategy.ts +++ b/tdrive/backend/node/src/core/platform/services/storage/oneof-storage-strategy.ts @@ -12,6 +12,14 @@ import { logger } from "../../../platform/framework"; * OneOfStorageStrategy is responsible for managing multiple storage backends. * It writes to, reads from, removes, and checks for the existence of files * across multiple storage systems. + * + * WARNING: Be careful using this strategy. There is a very big probability that + * all storages won't be synchronized. You need to use external synchronization + * tools like rclone to keep them in sync. + * As far as all the objects in a storage are immutable you won't have inconsistent + * state of the object except it could've been deleted, and it's still exists in one + * of the storages. So you will need to have external procedures to clean up storages + * and make "garbage" collection. */ export class OneOfStorageStrategy implements StorageConnectorAPI { constructor(private readonly storages: StorageConnectorAPI[]) {}