You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2020/09/24 02:37:00 UTC

[GitHub] [incubator-pegasus] Shuo-Jia commented on a change in pull request #608: fix: bugfix on incr

Shuo-Jia commented on a change in pull request #608:
URL: https://github.com/apache/incubator-pegasus/pull/608#discussion_r494004203



##########
File path: src/server/pegasus_write_service_impl.h
##########
@@ -182,59 +182,61 @@ class pegasus_write_service::impl : public dsn::replication::replica_base
         uint32_t new_expire_ts = 0;
         db_get_context get_ctx;
         int err = db_get(raw_key, &get_ctx);
-        if (err == 0) {
-            if (!get_ctx.found) {
-                // old value is not found, set to 0 before increment
-                new_value = update.increment;
-                new_expire_ts = update.expire_ts_seconds > 0 ? update.expire_ts_seconds : 0;
-            } else if (get_ctx.expired) {
-                // ttl timeout, set to 0 before increment
-                _pfc_recent_expire_count->increment();
+        if (err != 0) {
+            resp.error = err;

Review comment:
       The line seem to be useless?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org