Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions crates/lance-context-core/src/rollout_append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,29 @@ impl AppendCoordinator {
self.dataset.version().version
}

/// Read only latest manifests for explicitly configured writer identities.
/// No writer opens, raw WAL replay, generation payload reads, or publication.
/// Committed-but-undrained generations also need a maintenance pass.
pub async fn has_sealed_wal(&self, shards: &[String]) -> Result<bool> {
if shards.is_empty() || shards.len() > 256 {
return Err(Error::invalid_input(
"expected 1..=256 WAL shard identities",
));
}
let mut seen = HashSet::new();
for name in shards {
let id = derive_shard_id(Some(name));
if seen.insert(id) {
if let Some(manifest) = shard_store(&self.dataset, id).await?.read_latest().await? {
if !manifest.flushed_generations.is_empty() {
return Ok(true);
}
}
}
}
Ok(false)
}

pub async fn plan(
&mut self,
shards: &[String],
Expand Down
1 change: 1 addition & 0 deletions crates/lance-context-master/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub mod discovery;
pub mod error;
mod maintenance_execution;
mod merge_execution;
mod resident_recovery;
pub mod rollout_append;
pub mod routes;
pub mod scanner;
Expand Down
Loading
Loading