PragmaTwice commented on code in PR #1839:
URL: https://github.com/apache/kvrocks/pull/1839#discussion_r1366409412
##########
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:
After a deep look into this function, I think it need some other change. In
my view, I think it should not just return error when facing EOF.
```
StatusOr<size_t> Read(char *dst, size_t len) {
auto l = std::min(len, real_len);
copy(src, dst, l);
return l;
}
```
--
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]