diff --git a/src/server/hotkey_collector.cpp b/src/server/hotkey_collector.cpp index 026851e2b2..618c2c18ff 100644 --- a/src/server/hotkey_collector.cpp +++ b/src/server/hotkey_collector.cpp @@ -314,7 +314,10 @@ void hotkey_collector::query_result(dsn::replication::detect_hotkey_response &re LOG_INFO_PREFIX(hint); } else { resp.err = dsn::ERR_OK; - resp.__set_hotkey_result(pegasus::utils::c_escape_sensitive_string(_result.hot_hash_key)); + // Hot key should not be encrypted, thus use `c_escape_string` instead of + // `c_escape_sensitive_string` (otherwise it would be overwritten with + // ""). + resp.__set_hotkey_result(pegasus::utils::c_escape_string(_result.hot_hash_key)); } }