We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1513cf9 commit 1f17f8eCopy full SHA for 1f17f8e
1 file changed
src/pika_kv.cc
@@ -1771,7 +1771,9 @@ void PKSetexAtCmd::DoInitial() {
1771
}
1772
1773
void PKSetexAtCmd::Do() {
1774
- s_ = db_->storage()->PKSetexAt(key_, value_, static_cast<int32_t>(time_stamp_sec_ * 1000));
+ // Use int64_t to avoid overflow
1775
+ int64_t time_stamp_ms = static_cast<int64_t>(time_stamp_sec_) * 1000;
1776
+ s_ = db_->storage()->PKSetexAt(key_, value_, time_stamp_ms);
1777
if (s_.ok()) {
1778
res_.SetRes(CmdRes::kOk);
1779
} else if (s_.IsInvalidArgument()) {
0 commit comments