PragmaTwice commented on code in PR #2750:
URL: https://github.com/apache/kvrocks/pull/2750#discussion_r1932230187


##########
src/commands/cmd_hash.cc:
##########
@@ -258,6 +259,36 @@ class CommandHMSet : public Commander {
   std::vector<FieldValue> field_values_;
 };
 
+class CommandHSetEx : public Commander {
+ public:
+  Status Parse(const std::vector<std::string> &args) override {
+    if (args.size() < 5) {
+      return {Status::RedisParseErr, errWrongNumOfArguments};
+    }
+    ttl_ = GET_OR_RET(ParseInt<uint64_t>(args[2], 10));
+    for (size_t i = 3; i < args_.size(); i += 2) {
+      field_values_.emplace_back(args_[i], args_[i + 1]);
+    }

Review Comment:
   We should considered invalid input like `HSETEX key ttl k1 v1 k2` and reject 
it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to