Ferricstore.Flow.LMDBWriter (ferricstore v0.4.3)

Copy Markdown View Source

Async Flow projection writer for LMDB.

This module is a boundary between durable Flow truth and cold/query indexes. Raft + Bitcask state/history records are the source of truth. LMDBWriter consumes queued projection ops after the hot apply path and batches them into LMDB so history, terminal, lineage, and value-ref queries can catch up without blocking normal Flow writes.

Performance boundary

This is still a hot-adjacent module: enqueue cost is paid by Flow create, transition, terminal, retention, and history paths. Keep enqueue functions allocation-light and avoid extra processes/calls in request paths. Refactors here need DBOS/Flow benchmark comparison.

Summary

Functions

Returns a specification to start this module under a supervisor.

See Ferricstore.Flow.LMDBWriter.Control.discard/2.

See Ferricstore.Flow.LMDBWriter.Control.discard_all/1.

See Ferricstore.Flow.LMDBWriter.Control.discard_all/2.

See Ferricstore.Flow.LMDBWriter.Control.flush/1.

See Ferricstore.Flow.LMDBWriter.Control.flush/2.

See Ferricstore.Flow.LMDBWriter.Control.flush/3.

See Ferricstore.Flow.LMDBWriter.Control.flush_all/1.

See Ferricstore.Flow.LMDBWriter.Control.flush_all/2.

See Ferricstore.Flow.LMDBWriter.Control.flush_all/3.

See Ferricstore.Flow.LMDBWriter.Control.resume_all/1.

See Ferricstore.Flow.LMDBWriter.Control.resume_all/2.

See Ferricstore.Flow.LMDBWriter.Control.suspend/2.

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/1.

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/2.

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/3.

See Ferricstore.Flow.LMDBWriter.Control.suspend_without_flush/2.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

delete_apply_projection_cache_for_row(data_dir, shard_index, row)

discard(instance_name, shard_index)

See Ferricstore.Flow.LMDBWriter.Control.discard/2.

discard_all(shard_count)

See Ferricstore.Flow.LMDBWriter.Control.discard_all/1.

discard_all(instance_name, shard_count)

See Ferricstore.Flow.LMDBWriter.Control.discard_all/2.

durable?(instance_ctx, shard_index, shard_data_path, index)

durable_index(arg1, shard_index, shard_data_path)

emit_backlog(state, now)

enqueue(shard_index, ops)

enqueue(shard_index, ops, after_flush)

enqueue(instance_name, shard_index, ops, after_flush)

enqueue_and_maybe_flush(ops, after_flush, state)

enqueue_async(shard_index, ops)

enqueue_async(shard_index, ops, after_flush)

enqueue_async(instance_name, shard_index, ops, after_flush)

enqueue_ops(ops, after_flush, state, now)

enqueue_ops_capacity(op_count)

enqueue_projection_outbox(instance_name, shard_index, entries)

flush(shard_index)

See Ferricstore.Flow.LMDBWriter.Control.flush/1.

flush(shard_index_or_instance_name, timeout_or_shard_index)

See Ferricstore.Flow.LMDBWriter.Control.flush/2.

flush(instance_name, shard_index, timeout)

See Ferricstore.Flow.LMDBWriter.Control.flush/3.

flush_all(shard_count)

See Ferricstore.Flow.LMDBWriter.Control.flush_all/1.

flush_all(shard_count, timeout)

See Ferricstore.Flow.LMDBWriter.Control.flush_all/2.

flush_all(instance_name, shard_count, timeout)

See Ferricstore.Flow.LMDBWriter.Control.flush_all/3.

flush_pending_with_reply(state)

mark_mirror_degraded(instance_ctx, shard_index, reason)

mark_projection_dirty(instance_name, shard_index)

name(shard_index)

name(instance_name, shard_index)

projection_outbox_name(instance_name, shard_index)

record_flush_failure(instance_ctx, shard_index)

request(instance_ctx, shard_index, shard_data_path, index)

resume_all(shard_count)

See Ferricstore.Flow.LMDBWriter.Control.resume_all/1.

resume_all(instance_name, shard_count)

See Ferricstore.Flow.LMDBWriter.Control.resume_all/2.

start_link(opts)

suspend(instance_name, shard_index)

See Ferricstore.Flow.LMDBWriter.Control.suspend/2.

suspend_all(shard_count)

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/1.

suspend_all(shard_count, opts)

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/2.

suspend_all(instance_name, shard_count, opts)

See Ferricstore.Flow.LMDBWriter.Control.suspend_all/3.

suspend_without_flush(instance_name, shard_index)

See Ferricstore.Flow.LMDBWriter.Control.suspend_without_flush/2.

terminal_hot_ttl_ms()