DRDataRaft/ docs
GitHub ↗

dr_recover()

Preview first. A known live writer always blocks recovery. On Linux, the recorded host, boot ID and process start distinguish a dead process from a reused PID. For remote or unsupported hosts, recovery requires the caller to stop the original writer and explicitly set writer_stopped. Age alone never proves that a writer has stopped.

Usage

dr_recover(
  lake,
  run_ids = character(),
  staging_assets = character(),
  dry_run = TRUE,
  writer_stopped = FALSE
)

Arguments

lake
Connected lake.


run_ids
Explicit run IDs to recover. Empty previews list interrupted runs; execution never implicitly selects them.


staging_assets
Explicit asset names whose staging slots to remove.


dry_run
Preview only, the default.


writer_stopped
Confirm that writers with unknown liveness were stopped externally. Does not override a known live writer.

Value

A tibble identifying each selected run or staging slot, its writer state and planned or completed action.

Details

Selected running jobs become errors, retaining their inputs and quality evidence. Selected data-frame staging slots are removed; immutable landing deliveries and published tables are retained. Use dr_cleanup() separately for abandoned candidate tables. Run recovery with one coordinated writer. Database changes are transactional; staging removal happens afterwards and is reported separately, so an incomplete filesystem cleanup can be retried.

Examples

\dontshow{if (requireNamespace("duckdb", quietly = TRUE)) withAutoprint(\{ # examplesIf}
root <- tempfile("dataraft-")
lake <- dr_open_lake(root)
dr_recover(lake)
dr_close_lake(lake)
unlink(root, recursive = TRUE)
\dontshow{\}) # examplesIf}
Documentation source snapshot · View source at 113c179 ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.