From 82197c54e401df7f338b8c6d9593e2ad5537ea71 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Fri, 18 Oct 2024 13:40:24 -0700 Subject: [PATCH] perf: eliminate iop in refresh (#1760) Closes #1741 If we checkout a version, we need to make a `HEAD` request to get the size of the manifest. The new `checkout_latest()` code path can skip this IOP. This makes the refresh slightly faster. --- rust/lancedb/src/table/dataset.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rust/lancedb/src/table/dataset.rs b/rust/lancedb/src/table/dataset.rs index e84048981..a3c6348fa 100644 --- a/rust/lancedb/src/table/dataset.rs +++ b/rust/lancedb/src/table/dataset.rs @@ -54,9 +54,7 @@ impl DatasetRef { last_consistency_check, .. } => { - *dataset = dataset - .checkout_version(dataset.latest_version_id().await?) - .await?; + dataset.checkout_latest().await?; last_consistency_check.replace(Instant::now()); } Self::TimeTravel { dataset, version } => {