mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-21 23:19:53 +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
@ -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 New Issue
Block a user