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


##########
src/types/redis_json.cc:
##########
@@ -452,6 +452,11 @@ rocksdb::Status Json::numop(JsonValue::NumOpEnum op, const 
std::string &user_key
   if (!number_res || !number_res.GetValue().value.is_number()) {
     return rocksdb::Status::InvalidArgument("should be a number");
   }
+
+  if (!number_res.GetValue().value.is_int64() && 
!number_res.GetValue().value.is_double()) {
+    return rocksdb::Status::InvalidArgument("number out of range");
+  }

Review Comment:
   I think it can be fixed in the JsonValue::NumOp. Here we can only fix for 
`value`, not the number inside the current json.



-- 
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