-
Notifications
You must be signed in to change notification settings - Fork 502
feat: upgrade lance-namespace to 0.4.0 #5568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Code ReviewSummaryThis PR upgrades Critical Issues (P0/P1)P1: Missing tests for new The PR adds significant new functionality in
However, I don't see corresponding tests for these new code paths. Per the project's review guidelines: "We do not merge code without tests." Specifically, please add tests for:
P1: Race condition in deregistration check In Minor Observations
|
b60d77b to
8acdc5c
Compare
Code Review: feat: upgrade lance-namespace to 0.4.0SummaryThis PR upgrades lance-namespace to 0.4.0, implementing the new error handling spec and introducing P1 Issues1. Race condition in The sequence of checking if a table exists, then checking if it's deregistered, then creating the marker file is not atomic. Between the check and the write, another process could perform the same operation, leading to potential inconsistencies. While the PR description acknowledges this, consider at minimum using an atomic put-if-not-exists pattern for the marker file creation if the object store supports it. 2. Silent failure masking in async fn is_table_deregistered(&self, table_name: &str) -> bool {
...
.unwrap_or(false)
}This silently treats object store errors (network issues, permission problems) as "not deregistered", which could lead to operations succeeding on tables that should be inaccessible. Consider propagating the error or at least logging it. 3. Missing test coverage for deregister_table in non-manifest mode The
Minor Observations
|
8acdc5c to
982fca4
Compare
Code Review: PR #5568 - Upgrade lance-namespace to 0.4.0I reviewed this PR focusing on the most critical aspects. Overall, the implementation looks well-structured with comprehensive test coverage. P0 IssuesNone found. P1 Issues
Observations
|
Code Review: feat: upgrade lance-namespace to 0.4.0This PR upgrades lance-namespace to 0.4.0 with new error handling, P0 Issues (Must Fix)None identified. P1 Issues (Should Fix)
Minor Observations (Non-blocking)
|
PR Review: feat: upgrade lance-namespace to 0.4.0SummaryThis PR upgrades lance-namespace to 0.4.0, introducing error handling improvements, the new Potential Issues (P0/P1)P1: Race condition in deregistration check for In for entry in entries {
// ...
let table_name = &path[..path.len() - 6];
// Skip deregistered tables
if self.is_table_deregistered(table_name).await {
continue;
}
tables.push(table_name.to_string());
}This makes a separate P1: Python fallback exception handling may be too broad In except (UnsupportedOperationError, NotImplementedError, AttributeError):
# Fall back to deprecated create_empty_tableCatching Other Observations
|
Code Review: Upgrade lance-namespace to 0.4.0I reviewed this PR which upgrades the lance-namespace library to 0.4.0 with new error handling, P0/P1 Issues1. [P1] Missing The Python bindings in 2. [P1] Error handling mismatch in Python error.rs The current Compare with Java which properly extracts the LanceError::Namespace { source, .. } => {
if let Some(ns_err) = source.downcast_ref::<NamespaceError>() {
Self::namespace_error(ns_err.code().as_u32(), ns_err.to_string())
} else {
Self::runtime_error(err.to_string())
}
}3. [P1] Potential race condition in Python fallback logic In Minor Observations
SummaryThe core functionality is well-implemented. The main concerns are consistency between Java and Python error handling, and ensuring the Python bindings expose all necessary namespace methods. |
PR Review: feat: upgrade lance-namespace to 0.4.0This PR upgrades the lance-namespace dependency to 0.4.0 and implements full error handling, the new P0/P1 IssuesNo critical issues found. The implementation is well-structured with proper error handling across Rust, Python, and Java bindings. Minor Observations (non-blocking)
SummaryThe implementation cleanly separates the error handling spec implementation, API migration from LGTM ✓ |
Code Review: feat: upgrade lance-namespace to 0.4.0SummaryThis PR upgrades to lance-namespace 0.4.0, adding error handling spec support, introducing P0/P1 Issues1. Race Condition in
|
PR Review: feat: upgrade lance-namespace to 0.4.0This PR upgrades the SummaryThe changes look well-structured overall with good test coverage. I have one P1 concern to highlight: P1: Missing
|
8c63413 to
b60de08
Compare
PR Review: feat: upgrade lance-namespace to 0.4.0SummaryThis PR upgrades the lance-namespace dependency to 0.4.0 and implements several breaking changes from that version: a full error handling spec, deprecating ReviewNo P0/P1 issues identified. The implementation is well-structured with good test coverage. Minor Observations (non-blocking):
Overall, the changes are clean and well-tested. The integration with the 0.4.0 namespace spec appears complete. |
Make fixes for the following breaking changes in 0.4.0:
create_empty_tableis deprecated anddeclare_tableis introduced. We will start to usedeclare_table, and markcreate_empty_tableas deprecated and will be removed in 3.0.0. Ifdeclare_tablefails, it currently falls back tocreate_empty_table.deregister_tablesupport for dir namespace (without manifest), by adding a.lance-deregisteredfile. So when checking table existence, we check (1) the table directory exists, (2) if table directory exists, the.lance-deregisteredfile does not exist. This allows user to deregister a table immediately without deleting data which could be long running.