Skip to content
Draft
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
103 changes: 46 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ regex = "1.11.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
slatedb = { version = "0.7.0", features = ["moka"] }
slatedb = { version = "0.8.2", features = ["moka"] }
snafu = { version = "0.8.5", features = ["futures"] }
snmalloc-rs = { version = "0.3" }
strum = { version = "0.27.2", features = ["derive"] }
Expand Down
18 changes: 10 additions & 8 deletions crates/core-executor/src/snowflake_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use df_catalog::df_error::DFExternalError as DFCatalogExternalDFError;
use df_catalog::error::Error as CatalogError;
use embucket_functions::df_error::DFExternalError as EmubucketFunctionsExternalDFError;
use iceberg_rust::error::Error as IcebergError;
use slatedb::SlateDBError;
use snafu::GenerateImplicitData;
use snafu::{Location, Snafu, location};
use sqlparser::parser::ParserError;
Expand Down Expand Up @@ -286,16 +285,19 @@ fn core_utils_error(error: &core_utils::Error, subtext: &[&str]) -> SnowflakeErr
| DbError::KeyGet { error, .. }
| DbError::KeyDelete { error, .. }
| DbError::KeyPut { error, .. }
| DbError::ScanFailed { error, .. } => match error {
SlateDBError::ObjectStoreError(obj_store_error) => {
object_store_error(obj_store_error, &subtext)
}
_ => CustomSnafu {
| DbError::ScanFailed { error, .. } =>
// Since slatedb v0.8 SlateDbError is private, objectstore error can't be downcasted anymore
// Just return generic error, insteead of commented option
// slatedb::error::SlateDBError::ObjectStoreError(obj_store_error) => {
// object_store_error(obj_store_error, &subtext)
// }
{
CustomSnafu {
message: format_message(&subtext, error.to_string()),
error_code,
}
.build(),
},
.build()
}
_ => CustomSnafu {
message: format_message(&subtext, error.to_string()),
error_code,
Expand Down
4 changes: 1 addition & 3 deletions crates/core-executor/src/tests/e2e/e2e_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use object_store::{
aws::AmazonS3Builder, aws::AmazonS3ConfigKey, aws::S3ConditionalPut, local::LocalFileSystem,
};
use slatedb::DbBuilder;
use slatedb::db_cache::moka::MokaCache;
use snafu::ResultExt;
use snafu::{Location, Snafu};
use std::collections::HashMap;
Expand Down Expand Up @@ -122,7 +121,7 @@ pub const TEST_DATABASE_NAME: &str = "embucket";
#[snafu(visibility(pub))]
pub enum Error {
TestSlatedb {
source: slatedb::SlateDBError,
source: slatedb::Error,
object_store: Arc<dyn ObjectStore>,
#[snafu(implicit)]
location: Location,
Expand Down Expand Up @@ -659,7 +658,6 @@ impl ObjectStoreType {
object_store::path::Path::from(suffix.clone()),
self.object_store()?,
)
.with_block_cache(Arc::new(MokaCache::new()))
.build()
.await
.context(TestSlatedbSnafu {
Expand Down
15 changes: 7 additions & 8 deletions crates/core-executor/src/tests/e2e/tests_e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,8 @@ async fn test_e2e_s3_store_create_volume_with_non_existing_bucket() -> Result<()
Ok(())
}

// TODO: Consider what to do with such test
// we can't verify error type here is objectstore error or not, as of SlteDBError turned private
#[tokio::test]
#[ignore = "e2e test"]
#[allow(clippy::expect_used, clippy::too_many_lines)]
Expand Down Expand Up @@ -1552,14 +1554,11 @@ async fn test_e2e_s3_store_single_executor_s3_connection_issues_create_executor_

assert!(res.is_err());
if let Err(e) = &res {
match e {
// error happended in creating ExecutionService is internal, so do not check error type itself
Error::TestSlatedb {
source: slatedb::SlateDBError::ObjectStoreError(_object_store),
..
} => (),
_ => panic!("Expected other error, Actual error: {e}"),
}
// Since slatedb v0.8 SlateDbError is private, objectstore error can't be downcasted anymore.
// error happended in creating ExecutionService is internal, so do not check error type itself
// Error::TestSlatedb {
// source: slatedb::error::SlateDBError::ObjectStoreError(_object_store),
panic!("Expected other error, Actual error: {e}");
}

Ok(())
Expand Down
Loading
Loading