mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix server: fix write to slowlog on squashing flow (#4138)
Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
8bd2b9ed3e
commit
59c81fb98a
1 changed files with 4 additions and 0 deletions
|
@ -1358,6 +1358,10 @@ bool Service::InvokeCmd(const CommandId* cid, CmdArgList tail_args, SinkReplyBui
|
|||
// TODO: we should probably discard more commands here,
|
||||
// not just the blocking ones
|
||||
const auto* conn = cntx->conn();
|
||||
if (cntx->conn_state.squashing_info) {
|
||||
conn = cntx->conn_state.squashing_info->owner->conn();
|
||||
}
|
||||
|
||||
if (!(cid->opt_mask() & CO::BLOCKING) && conn != nullptr &&
|
||||
// Use SafeTLocal() to avoid accessing the wrong thread local instance
|
||||
ServerState::SafeTLocal()->ShouldLogSlowCmd(invoke_time_usec)) {
|
||||
|
|
Loading…
Reference in a new issue