acelyc111 commented on a change in pull request #656:
URL: https://github.com/apache/incubator-pegasus/pull/656#discussion_r543986380



##########
File path: src/server/rocksdb_write_batch_cleaner.h
##########
@@ -0,0 +1,37 @@
+/*

Review comment:
       You can use `dsn::defer`, not need to reimplement it.

##########
File path: src/server/pegasus_write_service_impl.h
##########
@@ -349,13 +350,13 @@ class pegasus_write_service::impl : public 
dsn::replication::replica_base
                 decree, dsn::string_view(), dsn::string_view(), 0);
         }
         if (resp.error) {
-            _rocksdb_wrapper->clear_up_write_batch();
+            rocksdb_write_batch_cleaner cleaner(_rocksdb_wrapper.get());

Review comment:
       Define it in the function body scope, then you can only define it once.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to