mapleFU commented on code in PR #1839:
URL: https://github.com/apache/kvrocks/pull/1839#discussion_r1366411373


##########
src/common/rdb_stream.cc:
##########
@@ -23,13 +23,13 @@
 #include "fmt/format.h"
 #include "vendor/crc64.h"
 
-StatusOr<size_t> RdbStringStream::Read(char *buf, size_t n) {
+Status RdbStringStream::Read(char *buf, size_t n) {

Review Comment:
   For comparing:
   
   ```c
   static inline size_t rioRead(rio *r, void *buf, size_t len) {
       if (r->flags & RIO_FLAG_READ_ERROR) return 0;
       while (len) {
           size_t bytes_to_read = (r->max_processing_chunk && 
r->max_processing_chunk < len) ? r->max_processing_chunk : len;
           if (r->read(r,buf,bytes_to_read) == 0) {
               r->flags |= RIO_FLAG_READ_ERROR;
               return 0;
           }
           if (r->update_cksum) r->update_cksum(r,buf,bytes_to_read);
           buf = (char*)buf + bytes_to_read;
           len -= bytes_to_read;
           r->processed_bytes += bytes_to_read;
       }
       return 1;
   }
   ```



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