Skip to content

fix(rollout): observe() row_count systematically undercounts unflushed rows; add() return value is now meaningless #187

Description

@beinan

Two small API-surface problems that both fall out of the #181 flush decoupling.

1. RolloutObservation::row_count undercounts

crates/lance-context-core/src/rollout_store.rs:119:

/// Logical row count across the base table and every flushed MemWAL shard.
pub row_count: i64,

Rows sitting in an unsealed active memtable are counted by neither the base table nor any flushed generation. Before #181 every append was sealed before returning, so this was accurate. Now, in steady state, row_count is permanently short by roughly one flush interval's worth of writes.

Consumers affected: the control-plane stats scanner, capacity/compaction decisions derived from it, and any row count shown in the UI.

Options:

  • document the field as "flushed rows only", and/or
  • add an unflushed_rows / flush-lag field to RolloutObservation so the gap is observable rather than invisible.

2. add()'s return value no longer carries information

crates/lance-context-core/src/rollout_store.rs:575:

Ok(self.dataset.manifest.version)

MemWAL appends do not advance the base dataset version — the doc at rollout_store.rs:540-542 already admits it is "retained for API compatibility, not as a per-append snapshot handle". Post-#181 it does not even signal that a seal completed. It is now a constant unrelated to the write the caller just performed, which is more misleading than returning nothing.

Options:

Both are breaking changes to the core signature, so worth bundling into one version bump.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions