From 8742938f94396703a34cc196d8404a548d3dfe08 Mon Sep 17 00:00:00 2001 From: Handy-caT <37216852+Handy-caT@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:13:01 +0300 Subject: [PATCH 1/2] update indexset version --- Cargo.toml | 4 ++-- src/page/index/page_cdc_impl.rs | 2 +- src/page/index/page_for_unsized_cdc_impl.rs | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8552b3..c74c539 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ rkyv = { version = "0.8.9", features = ["uuid-1"] } lockfree = "0.5.1" uuid = { version = "1.11.0", features = ["v4"] } ordered-float = "5.0.0" -indexset = { version = "0.12.2", features = ["concurrent", "cdc", "multimap"] } -# indexset = { path = "../indexset", version = "0.12.0", features = ["concurrent", "cdc", "multimap"] } +indexset = { version = "0.12.3", features = ["concurrent", "cdc", "multimap"] } +# indexset = { path = "../indexset", version = "0.12.2", features = ["concurrent", "cdc", "multimap"] } # indexset = { git = "https://github.com/Handy-caT/indexset", branch = "multimap-range-fix", version = "0.12.0", features = ["concurrent", "cdc", "multimap"] } tokio = { version = "1", features = ["full"] } diff --git a/src/page/index/page_cdc_impl.rs b/src/page/index/page_cdc_impl.rs index e9091b7..adc7325 100644 --- a/src/page/index/page_cdc_impl.rs +++ b/src/page/index/page_cdc_impl.rs @@ -100,7 +100,7 @@ where } fn apply_remove_at(&mut self, index: usize) -> eyre::Result<()> { - // For remove we first remove slot entry for index value + // For remove we first remove slot entry for index value let value_position = self.slots.remove(index); // We push 0 in the tail because slots size should be fixed. self.slots.push(0); diff --git a/src/page/index/page_for_unsized_cdc_impl.rs b/src/page/index/page_for_unsized_cdc_impl.rs index a4098e1..4399f3e 100644 --- a/src/page/index/page_for_unsized_cdc_impl.rs +++ b/src/page/index/page_for_unsized_cdc_impl.rs @@ -48,7 +48,10 @@ where value, index, } => { - if value == max_value { + // we are checking if index is non-zero because for non-unique indexes this is possible and will + // lead to panic, but in this case new node_id will be same to current node_id so it's change + // will not affect at all. + if value == max_value && index != 0 { let new_node_id = self .index_values .get(index - 1) From d4b45dc80787b24cb27d6d9708b87bd9b054d28e Mon Sep 17 00:00:00 2001 From: Handy-caT <37216852+Handy-caT@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:15:21 +0300 Subject: [PATCH 2/2] version bump --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c74c539..5110b34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["codegen", "tools/create-data-file", "tools/dump-data-file"] [package] name = "data_bucket" -version = "0.2.6" +version = "0.2.7" edition = "2021" authors = ["Handy-caT"] license = "MIT"