[rust] Return TableNotExist for missing tables - #4271
Open
adamrecsko wants to merge 1 commit into
Open
Conversation
Check table existence before refreshing its metadata so get_table returns TableNotExist instead of InvalidTableException for a missing table. Add an integration test covering the expected error classification. Fixes apache#4270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generative AI disclosure
Purpose
Linked issue: close #4270
FlussConnection::get_tablecurrently returnsInvalidTableExceptionwhen the requested table does not exist. This prevents callers from reliably distinguishing amissing table from network, timeout, or other RPC failures.
This change makes
get_tablereturnFlussError::TableNotExistwhen the table is absent while preserving other errors unchanged.Brief change log
TableNotExisterror when the table is absent.Tests
The following checks were run:
cargo fmt --all -- --checkRUST_TEST_THREADS=1 RUST_LOG=DEBUG RUST_BACKTRACE=full cargo test --features integration_tests --test test_fluss -p fluss-rs -- --nocaptureThe new integration test passed:
test_get_nonexistent_table_returns_table_not_existFull integration-suite result:
get_tableerror-classification change.API and Format
This change does not modify the public API, wire protocol, or storage format. It corrects the error code returned by the existing
FlussConnection::get_tableAPI.