You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "belliottsmith (via GitHub)" <gi...@apache.org> on 2024/11/02 14:55:13 UTC

[PR] Sync new epochs with ExclusiveSyncPoints [cassandra-accord]

belliottsmith opened a new pull request, #131:
URL: https://github.com/apache/cassandra-accord/pull/131

   (no comment)


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Sync new epochs with ExclusiveSyncPoints [cassandra-accord]

Posted by "ifesdjeen (via GitHub)" <gi...@apache.org>.
ifesdjeen commented on code in PR #131:
URL: https://github.com/apache/cassandra-accord/pull/131#discussion_r1827616315


##########
accord-core/src/main/java/accord/local/cfk/Updating.java:
##########
@@ -721,18 +721,25 @@ static void updateUnmanagedAsync(CommandStore commandStore, TxnId txnId, Routing
 
     static CommandsForKeyUpdate updateUnmanaged(CommandsForKey cfk, SafeCommand safeCommand)
     {
-        return Updating.updateUnmanaged(cfk, safeCommand, false, null);
+        return Updating.updateUnmanaged(cfk, safeCommand, UPDATE, null);
+    }
+
+    static CommandsForKeyUpdate registerDependencies(CommandsForKey cfk, SafeCommand safeCommand)

Review Comment:
   Currently unused; deliberate? (probably will be in follow-up patches?)



##########
accord-core/src/main/java/accord/local/CommandStore.java:
##########
@@ -564,6 +556,37 @@ protected void updatedRedundantBefore(SafeCommandStore safeStore, TxnId syncId,
     {
     }
 
+    protected void markSynced(TxnId syncId, Ranges ranges)
+    {
+        if (waitingOnSync.isEmpty())
+            return;
+
+        LongHashSet remove = null;
+        for (Map.Entry<Long, WaitingOnSync> e : waitingOnSync.entrySet())
+        {
+            if (e.getKey() > syncId.epoch())
+                break;
+
+            Ranges remaining = e.getValue().ranges;
+            Ranges synced = remaining.slice(ranges, Minimal);
+            e.getValue().ranges = remaining = remaining.without(ranges);
+            if (e.getValue().ranges.isEmpty())
+            {
+                logger.info("Completed full sync for {} on epoch {} using {}", e.getValue().allRanges, e.getKey(), syncId);

Review Comment:
   nit: maybe should be `debug`?



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Sync new epochs with ExclusiveSyncPoints [cassandra-accord]

Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith merged PR #131:
URL: https://github.com/apache/cassandra-accord/pull/131


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org