kirito632 commented on code in PR #3502:
URL: https://github.com/apache/kvrocks/pull/3502#discussion_r3486105631


##########
src/types/redis_stream_base.cc:
##########
@@ -59,16 +92,16 @@ Status ParseStreamEntryID(const std::string &input, 
StreamEntryID *id) {
   if (pos != std::string::npos) {
     auto ms_str = input.substr(0, pos);
     auto seq_str = input.substr(pos + 1);
-    auto parse_ms = ParseInt<uint64_t>(ms_str, 10);
-    auto parse_seq = ParseInt<uint64_t>(seq_str, 10);
+    auto parse_ms = ParseStreamEntryIDComponent(ms_str, false);
+    auto parse_seq = ParseStreamEntryIDComponent(seq_str, true);
     if (!parse_ms || !parse_seq) {
       return {Status::RedisParseErr, kErrInvalidEntryIdSpecified};
     }
 
     id->ms = *parse_ms;
     id->seq = *parse_seq;
   } else {
-    auto parse_input = ParseInt<uint64_t>(input, 10);
+    auto parse_input = ParseStreamEntryIDComponent(input, false);

Review Comment:
   I verified this against Redis 8.2 locally and found that these signed 
zero-equivalent IDs are accepted by XDELEX (and some other stream commands). 
I'll revert the shared parser changes and keep the compatibility handling local 
to XDELEX instead.Also, regarding the size of this PR, would you prefer me to 
split it into smaller PRs at this point, or would you rather keep this PR as-is.



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