ExStorageService.Cluster.Drain (ex_storage_service v0.6.3)

Copy Markdown View Source

Node-drain control and bounded, derived progress reporting.

Setting the durable draining flag immediately excludes the node from new rendezvous placement. Repair planners then copy missing desired replicas; cleanup jobs retire the old location only after metadata confirms RF.

Summary

Functions

cancel(context, node_id, opts \\ [])

@spec cancel(ExStorageService.Context.t(), binary(), keyword()) ::
  {:ok, map()} | {:error, term()}

start(context, node_id, opts \\ [])

@spec start(ExStorageService.Context.t(), binary(), keyword()) ::
  {:ok, map()} | {:error, term()}

status_page(context, node_id, cursor \\ nil, limit \\ 100, opts \\ [])

@spec status_page(
  ExStorageService.Context.t(),
  binary(),
  binary() | nil,
  pos_integer(),
  keyword()
) ::
  {:ok,
   %{
     node_id: binary(),
     blobs_remaining: non_neg_integer(),
     awaiting_repair: non_neg_integer(),
     ready_to_retire: non_neg_integer(),
     blockers: [map()],
     next_cursor: binary() | nil
   }}
  | {:error, term()}