Skip to content

Commit

Permalink
txn: add more logs before assertions (#16829)
Browse files Browse the repository at this point in the history
ref #16818

Signed-off-by: cfzjywxk <cfzjywxk@gmail.com>
  • Loading branch information
cfzjywxk committed Apr 15, 2024
1 parent 67b21cd commit f3ddb57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/resolved_ts/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ impl KeyOp {
}
}

#[derive(Default)]
#[derive(Default, Debug)]
struct RowChange {
write: Option<KeyOp>,
lock: Option<KeyOp>,
Expand Down Expand Up @@ -221,6 +221,9 @@ fn group_row_changes(requests: Vec<Request>) -> (HashMap<Key, RowChange>, bool)
}
CF_LOCK => {
let row = changes.entry(key).or_default();
if let Some(lock) = &row.lock {
error!("there is already lock={:?} on row={:?}", lock, row);
}
assert!(row.lock.is_none());
row.lock = Some(KeyOp::Put(None, value));
}
Expand Down

0 comments on commit f3ddb57

Please sign in to comment.