belliottsmith commented on code in PR #26:
URL: https://github.com/apache/cassandra-accord/pull/26#discussion_r1093739655


##########
accord-core/src/main/java/accord/coordinate/Recover.java:
##########
@@ -212,56 +213,63 @@ private void recover()
             {
                 default: throw new IllegalStateException();
                 case Invalidated:
+                {
                     commitInvalidate();
                     return;
+                }
 
                 case Applied:
                 case PreApplied:
-                    // TODO (desired, efficiency): in some cases we can use 
the deps we already have (e.g. if we have a quorum of Committed responses)
-                    node.withEpoch(executeAt.epoch(), () -> {
-                        CollectDeps.withDeps(node, txnId, route, txn, 
acceptOrCommit.executeAt, (deps, fail) -> {
-                            if (fail != null)
-                            {
-                                accept(null, fail);
-                            }
-                            else
-                            {
-                                // TODO (required, consider): when 
writes/result are partially replicated, need to confirm we have quorum of these
-                                Persist.persistAndCommit(node, txnId, route, 
txn, executeAt, deps, acceptOrCommit.writes, acceptOrCommit.result);
-                                accept(acceptOrCommit.result, null);
-                            }
-                        });
-                    });
+                {
+                    // must have gone through Accepted, so we must have 
witnessed >= Accepted for each shard
+                    Deps acceptedDeps = tryMergeAcceptedDeps();

Review Comment:
   Yes, we require a quorum from each side for recovery. There were TODOs about 
using the deps we have where possible, and for this work it made sense to just 
do that since we need it for the exclusive sync point - which *proposes* deps, 
i.e. expects *precisely* those deps to be re-proposed should it fail to durably 
commit/apply/whathaveyou.



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