frankgh commented on code in PR #4761:
URL: https://github.com/apache/cassandra/pull/4761#discussion_r3261108686


##########
src/java/org/apache/cassandra/replication/MutationTrackingService.java:
##########
@@ -1372,6 +1374,94 @@ static int loadHostLogIdFromSystemTable()
         return rows.one().getInt("host_log_id");
     }
 
+    private static class BackgroundReconciler
+    {
+        private static final long RECONCILE_INTERVAL_MILLIS = 1_000;
+
+        private volatile boolean isPaused = false;
+
+        void start()
+        {
+            executor.scheduleWithFixedDelay(this::run,
+                                            RECONCILE_INTERVAL_MILLIS,
+                                            RECONCILE_INTERVAL_MILLIS,
+                                            TimeUnit.MILLISECONDS);
+        }
+
+        void run()
+        {
+            MutationTrackingService.instance().forEachKeyspace(this::run);
+        }
+
+        private void run(KeyspaceShards shards)
+        {
+            if (!isPaused)
+                shards.forEachShard(this::run);
+        }
+
+        private void run(Shard shard)
+        {
+            try
+            {
+                List<Offsets.Immutable> missing = 
shard.collectLocallyMissingOffsets();

Review Comment:
   Created issues.apache.org/jira/browse/CASSANDRA-21387



-- 
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: [email protected]

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