Skip to main content

write_rows_spread

Function write_rows_spread 

Source
pub async fn write_rows_spread(
    client: &PersistClient,
    shard: ShardId,
    desc: &RelationDesc,
    rows: &[Row],
    n_ts: u64,
) -> Result<()>
Expand description

Writes rows spread across timestamps 0..n_ts (row i at time i % n_ts) in a single append that seals [0, n_ts). All rows are inserted with diff +1. This is one compare_and_append regardless of n_ts — persist accepts updates at any timestamp within the sealed range — so it stays fast even for very large n_ts (a per-timestamp append would be n_ts consensus round-trips).