You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2023/01/11 07:15:43 UTC
[GitHub] [incubator-kvrocks] torwig commented on a diff in pull request #1222: Kvrocks2Redis: decode slot ID in cluster mode
torwig commented on code in PR #1222:
URL: https://github.com/apache/incubator-kvrocks/pull/1222#discussion_r1066643426
##########
utils/kvrocks2redis/sync.cc:
##########
@@ -180,8 +180,12 @@ Status Sync::incrementBatchLoop() {
if (bulk_data_str != "ping") {
auto bat = rocksdb::WriteBatch(bulk_data_str);
int count = static_cast<int>(bat.Count());
- parser_->ParseWriteBatch(bulk_data_str);
- auto s = updateNextSeq(next_seq_ + count);
+ auto s = parser_->ParseWriteBatch(bulk_data_str);
+ if (!s.IsOK()) {
+ return s.Prefixed(fmt::format("failed to parse write batch '{}'", Util::StringToHex(bulk_data_str)));
Review Comment:
@caipengbo I've just recalled that we use the same approach in replication [(here)](https://github.com/apache/incubator-kvrocks/blob/unstable/src/cluster/replication.cc#L552) and thought that perhaps it was intended to help with debugging.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org