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
5 changes: 4 additions & 1 deletion crates/lance-context-core/src/api_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ impl ContextStoreApi for ContextStore {
}

let count = core_records.len();
let version = self.add(&core_records).await.map_err(to_ctx_err)?;
// Disambiguate: the inherent `ContextStore::add`, not this trait method.
let version = ContextStore::add(self, &core_records)
.await
.map_err(to_ctx_err)?;
Ok(AddRecordsResponse {
version,
ids,
Expand Down
567 changes: 149 additions & 418 deletions crates/lance-context-core/src/datagen_store.rs

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions crates/lance-context-core/src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ mod tests {
let uri = dir.path().to_string_lossy().to_string();
let runtime = tokio::runtime::Runtime::new().unwrap();
runtime.block_on(async {
let mut store = ContextStore::open(&uri).await.unwrap();
let store = ContextStore::open(&uri).await.unwrap();
let a = embedding(&store, &[1.0]);
let b = embedding(&store, &[0.5]);
let c = embedding(&store, &[0.0, 1.0]);
Expand Down Expand Up @@ -579,7 +579,7 @@ mod tests {
let uri = dir.path().to_string_lossy().to_string();
let runtime = tokio::runtime::Runtime::new().unwrap();
runtime.block_on(async {
let mut store = ContextStore::open(&uri).await.unwrap();
let store = ContextStore::open(&uri).await.unwrap();
let q = embedding(&store, &[1.0]);
// the only relevant doc is retired -> hidden by default.
let mut retired = record("doc-a", "alpha", q.clone());
Expand Down Expand Up @@ -624,7 +624,7 @@ mod tests {
let uri = dir.path().to_string_lossy().to_string();
let runtime = tokio::runtime::Runtime::new().unwrap();
runtime.block_on(async {
let mut store = ContextStore::open(&uri).await.unwrap();
let store = ContextStore::open(&uri).await.unwrap();
let shared = embedding(&store, &[1.0]);
let mut a = record("doc-a", "alpha", shared.clone());
a.tenant = Some("x".to_string());
Expand Down Expand Up @@ -662,7 +662,7 @@ mod tests {
let uri = dir.path().to_string_lossy().to_string();
let runtime = tokio::runtime::Runtime::new().unwrap();
runtime.block_on(async {
let mut store = ContextStore::open(&uri).await.unwrap();
let store = ContextStore::open(&uri).await.unwrap();
let a = embedding(&store, &[1.0]);
let b = embedding(&store, &[0.0, 1.0]);
store
Expand Down Expand Up @@ -701,7 +701,7 @@ mod tests {
let uri = dir.path().to_string_lossy().to_string();
let runtime = tokio::runtime::Runtime::new().unwrap();
runtime.block_on(async {
let mut store = ContextStore::open(&uri).await.unwrap();
let store = ContextStore::open(&uri).await.unwrap();
let a = embedding(&store, &[1.0]);
let b = embedding(&store, &[0.5]);
store
Expand Down
2 changes: 1 addition & 1 deletion crates/lance-context-core/src/namespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ mod tests {
let selector = selector(&[("tenant", "acme"), ("source", "memory")]);
let partition = namespace.resolve_partition(&selector).unwrap();

let mut store = namespace.context(&selector).await.unwrap();
let store = namespace.context(&selector).await.unwrap();
store
.add(&[record("rec-1", "acme", "memory")])
.await
Expand Down
5 changes: 5 additions & 0 deletions crates/lance-context-core/src/rollout_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ impl RolloutStore {
// claim-check columns), so a WAL merge first evolves an older
// base table to the current schema before appending.
latest_schema: Some(Arc::new(rollout_schema())),
// Rollout defers the seal: high fan-in appends must not
// serialize behind a per-append seal, and rollout rows are
// immutable so nothing reads back before writing. The server's
// flush sweeper (and `?flush=true`) provide visibility.
seal_on_put: false,
},
create_if_missing,
)
Expand Down
Loading
Loading