You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "acelyc111 (via GitHub)" <gi...@apache.org> on 2023/08/06 13:21:32 UTC

[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #1556: fix: some replicas never start manaul compact after zero o'clock

acelyc111 commented on code in PR #1556:
URL: https://github.com/apache/incubator-pegasus/pull/1556#discussion_r1285218299


##########
src/server/pegasus_manual_compact_service.cpp:
##########
@@ -301,6 +302,20 @@ void pegasus_manual_compact_service::manual_compact(const rocksdb::CompactRangeO
         LOG_INFO_PREFIX("ignored compact because exceed max_concurrent_running_count({})",
                         _max_concurrent_running_count.load());
         _manual_compact_enqueue_time_ms.store(0);
+
+        _pfc_manual_compact_enqueue_count->increment();
+        int loop_enqueue_time = now_timestamp() + 60 * 1000;
+        _manual_compact_enqueue_time_ms.store(loop_enqueue_time);
+        dsn::tasking::enqueue(LPC_MANUAL_COMPACT,
+                              &_app->_tracker,
+                              [this, options]() {
+                                  _pfc_manual_compact_enqueue_count->decrement();
+                                  manual_compact(options);
+                              },
+                              0,
+                              std::chrono::seconds(60));
+        LOG_INFO_PREFIX("retry 60 seconds later,now task enqueue time({})ms",

Review Comment:
   Another question is: when to give up retrying?
   Suppose a rare case, there are 24 replicas of a table on a server, each one cost more than 1 hour to manual compact, will the queue increase infinity?



-- 
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: dev-unsubscribe@pegasus.apache.org

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