Skip to content

Commit

Permalink
fix: set prefix_hint to none when prefix_hint_len is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang committed Feb 18, 2023
1 parent 03c26b0 commit 0fa766e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/stream/src/common/table/state_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ impl<S: StateStore, W: WatermarkBufferStrategy> StateTable<S, W> {
}
let prefix_hint = {
if self.prefix_hint_len == 0 || self.prefix_hint_len > pk_prefix.len() {
panic!();
None
} else {
let encoded_prefix_len = self
.pk_serde
Expand Down
4 changes: 2 additions & 2 deletions src/stream/src/executor/managed_state/join/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl<K: HashKey, S: StateStore> JoinHashMap<K, S> {
} else {
let prefix = key.deserialize(&self.join_key_data_types)?;
self.metrics.insert_cache_miss_count += 1;
// Refill cache when the join key exist in neither cache or storage.
// Refill cache when the join key exists in neither cache or storage.
if !self.state.table.may_exist(&prefix).await? {
let mut state = JoinEntryState::default();
state.insert(pk, value.encode());
Expand Down Expand Up @@ -468,7 +468,7 @@ impl<K: HashKey, S: StateStore> JoinHashMap<K, S> {
} else {
let prefix = key.deserialize(&self.join_key_data_types)?;
self.metrics.insert_cache_miss_count += 1;
// Refill cache when the join key exist in neither cache or storage.
// Refill cache when the join key exists in neither cache or storage.
if !self.state.table.may_exist(&prefix).await? {
let mut state = JoinEntryState::default();
state.insert(pk, join_row.encode());
Expand Down

0 comments on commit 0fa766e

Please sign in to comment.