mix ferricstore.merge (ferricstore v0.3.4)

Copy Markdown View Source

Triggers a manual merge/compaction check on one or all FerricStore shards.

Usage

mix ferricstore.merge [shard_index]

Arguments

  • shard_index (optional) -- zero-based index of the shard to compact. Must be in the range 0..(shard_count - 1). When omitted, triggers a merge check on all shards.

Behaviour

Calls Ferricstore.Merge.Scheduler.trigger_check/1 which runs the merge decision logic synchronously: check fragmentation, acquire the semaphore, and run compaction if warranted. If the shard does not need compaction (fragmentation below threshold, not enough files, etc.), the check completes as a no-op.

Examples

# Trigger merge on shard 0
mix ferricstore.merge 0

# Trigger merge on all shards
mix ferricstore.merge

Summary

Functions

Runs the merge task.

Functions

run(list)

@spec run(list()) :: :ok

Runs the merge task.

Parameters

  • args -- command-line arguments. If the first element is a valid shard index, triggers merge on that shard only. Otherwise triggers on all shards.