Skip to content

Commit 213bb4a

Browse files
YaroslavLitvinovnikitastryukgithub-actions[bot]
committed
Yaro/slatedb durability config2 (#1773)
* update slatedb to v0.8.2 * use less durable but faster option when put history items * [UI] Static hostname issue fix (Run-time Placeholder solution) (#1770) * CI: Generate build artifacts (dist.tar) [skip ci] --------- Co-authored-by: Nikita Striuk <32720808+nikitastryuk@users.noreply.github.com> Co-authored-by: github-actions[bot] <1310417+github-actions[bot]@users.noreply.github.com>
1 parent 0f9c0db commit 213bb4a

File tree

10 files changed

+83
-90
lines changed

10 files changed

+83
-90
lines changed

Cargo.lock

Lines changed: 46 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ regex = "1.11.1"
6767
serde = { version = "1.0", features = ["derive"] }
6868
serde_json = "1.0"
6969
serde_yaml = "0.9"
70-
slatedb = { version = "0.7.0", features = ["moka"] }
70+
slatedb = { version = "0.8.2", features = ["moka"] }
7171
snafu = { version = "0.8.5", features = ["futures"] }
7272
snmalloc-rs = { version = "0.3" }
7373
strum = { version = "0.27.2", features = ["derive"] }

crates/core-executor/src/snowflake_error.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use df_catalog::df_error::DFExternalError as DFCatalogExternalDFError;
1212
use df_catalog::error::Error as CatalogError;
1313
use embucket_functions::df_error::DFExternalError as EmubucketFunctionsExternalDFError;
1414
use iceberg_rust::error::Error as IcebergError;
15-
use slatedb::SlateDBError;
1615
use snafu::GenerateImplicitData;
1716
use snafu::{Location, Snafu, location};
1817
use sqlparser::parser::ParserError;
@@ -286,16 +285,19 @@ fn core_utils_error(error: &core_utils::Error, subtext: &[&str]) -> SnowflakeErr
286285
| DbError::KeyGet { error, .. }
287286
| DbError::KeyDelete { error, .. }
288287
| DbError::KeyPut { error, .. }
289-
| DbError::ScanFailed { error, .. } => match error {
290-
SlateDBError::ObjectStoreError(obj_store_error) => {
291-
object_store_error(obj_store_error, &subtext)
292-
}
293-
_ => CustomSnafu {
288+
| DbError::ScanFailed { error, .. } =>
289+
// Since slatedb v0.8 SlateDbError is private, objectstore error can't be downcasted anymore
290+
// Just return generic error, insteead of commented option
291+
// slatedb::error::SlateDBError::ObjectStoreError(obj_store_error) => {
292+
// object_store_error(obj_store_error, &subtext)
293+
// }
294+
{
295+
CustomSnafu {
294296
message: format_message(&subtext, error.to_string()),
295297
error_code,
296298
}
297-
.build(),
298-
},
299+
.build()
300+
}
299301
_ => CustomSnafu {
300302
message: format_message(&subtext, error.to_string()),
301303
error_code,

crates/core-executor/src/tests/e2e/e2e_common.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use object_store::{
2323
aws::AmazonS3Builder, aws::AmazonS3ConfigKey, aws::S3ConditionalPut, local::LocalFileSystem,
2424
};
2525
use slatedb::DbBuilder;
26-
use slatedb::db_cache::moka::MokaCache;
2726
use snafu::ResultExt;
2827
use snafu::{Location, Snafu};
2928
use std::collections::HashMap;
@@ -122,7 +121,7 @@ pub const TEST_DATABASE_NAME: &str = "embucket";
122121
#[snafu(visibility(pub))]
123122
pub enum Error {
124123
TestSlatedb {
125-
source: slatedb::SlateDBError,
124+
source: slatedb::Error,
126125
object_store: Arc<dyn ObjectStore>,
127126
#[snafu(implicit)]
128127
location: Location,
@@ -659,7 +658,6 @@ impl ObjectStoreType {
659658
object_store::path::Path::from(suffix.clone()),
660659
self.object_store()?,
661660
)
662-
.with_block_cache(Arc::new(MokaCache::new()))
663661
.build()
664662
.await
665663
.context(TestSlatedbSnafu {

crates/core-executor/src/tests/e2e/tests_e2e.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,8 @@ async fn test_e2e_s3_store_create_volume_with_non_existing_bucket() -> Result<()
14971497
Ok(())
14981498
}
14991499

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

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

15651564
Ok(())

0 commit comments

Comments
 (0)