ExStorageService.CrossClusterReplication.Worker (ex_storage_service v0.6.4)

Copy Markdown View Source

Streams immutable object versions to external S3-compatible replicas.

Cross-cluster replication is eventual disaster recovery. It is not part of the in-cluster RF/W durability quorum. A worker resolves the pinned blob from any currently readable cluster location and sends it with an explicit content length, without assembling an object-sized binary.

Authentication remains the legacy bearer-token scheme until replica targets are migrated to SigV4.

Summary

Functions

Replicates a DELETE to the external replica.

Replicates a pinned PUT to an external replica.

Types

replica()

@type replica() :: map()

Functions

replicate_delete(bucket, key, replica)

@spec replicate_delete(String.t(), String.t(), replica()) :: :ok | {:error, term()}

Replicates a DELETE to the external replica.

Successful responses and a missing destination key are both idempotent success.

replicate_put(bucket, key, replica, object_info \\ nil)

@spec replicate_put(String.t(), String.t(), replica(), map() | nil) ::
  :ok | {:error, term()}

Replicates a pinned PUT to an external replica.

object_info contains at least content_hash and size. Passing nil preserves the legacy behavior of pinning the current object metadata at execution time.