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 2022/11/05 12:05:20 UTC

[GitHub] [incubator-kvrocks] PragmaTwice opened a new pull request, #1076: Fix compiler warning in replication

PragmaTwice opened a new pull request, #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076

   ```
   /home/twice/incubator-kvrocks/src/cluster/replication.cc: In ‘rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string&)’:
   /home/twice/incubator-kvrocks/src/cluster/replication.cc:903:10: Warning: switch does not handle ‘kBatchTypeNone’ [-Wswitch]
     903 |   switch (write_batch_handler.Type()) {
         |          ^
   [ 92%] Built target kvrocks_objs
   ```


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


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076#discussion_r1014631821


##########
src/cluster/replication.cc:
##########
@@ -921,6 +921,9 @@ rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string &batch_stri
       GetFixed64(&entry_id, &id.seq);
       srv_->OnEntryAddedToStream(ikey.GetNamespace().ToString(), ikey.GetKey().ToString(), id);
       break;
+    }
+    default:

Review Comment:
   Yep. I'd prefer explicit than implicit but it's not a blocker from merging :)



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


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on code in PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076#discussion_r1014631964


##########
src/cluster/replication.cc:
##########
@@ -921,6 +921,9 @@ rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string &batch_stri
       GetFixed64(&entry_id, &id.seq);
       srv_->OnEntryAddedToStream(ikey.GetNamespace().ToString(), ikey.GetKey().ToString(), id);
       break;
+    }
+    default:

Review Comment:
   ```suggestion
       case kBatchTypeNone:
   ```



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


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on code in PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076#discussion_r1014631979


##########
src/cluster/replication.cc:
##########
@@ -921,6 +921,9 @@ rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string &batch_stri
       GetFixed64(&entry_id, &id.seq);
       srv_->OnEntryAddedToStream(ikey.GetNamespace().ToString(), ikey.GetKey().ToString(), id);
       break;
+    }
+    default:

Review Comment:
   done
   



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


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on code in PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076#discussion_r1014631293


##########
src/cluster/replication.cc:
##########
@@ -921,6 +921,9 @@ rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string &batch_stri
       GetFixed64(&entry_id, &id.seq);
       srv_->OnEntryAddedToStream(ikey.GetNamespace().ToString(), ikey.GetKey().ToString(), id);
       break;
+    }
+    default:

Review Comment:
   I think both of them is OK here.



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


[GitHub] [incubator-kvrocks] PragmaTwice merged pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
PragmaTwice merged PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076


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


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #1076: Fix compiler warning in replication

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #1076:
URL: https://github.com/apache/incubator-kvrocks/pull/1076#discussion_r1014630864


##########
src/cluster/replication.cc:
##########
@@ -921,6 +921,9 @@ rocksdb::Status ReplicationThread::ParseWriteBatch(const std::string &batch_stri
       GetFixed64(&entry_id, &id.seq);
       srv_->OnEntryAddedToStream(ikey.GetNamespace().ToString(), ikey.GetKey().ToString(), id);
       break;
+    }
+    default:

Review Comment:
   I don't know whether C++ can resolve exhaustive `case` and we just write `case kBatchTypeNone:` here. 



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