aweisberg commented on code in PR #113: URL: https://github.com/apache/cassandra-accord/pull/113#discussion_r1739227808
########## accord-core/src/main/java/accord/coordinate/AsynchronousAwait.java: ########## @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package accord.coordinate; + +import java.util.function.BiConsumer; +import javax.annotation.Nullable; + +import accord.api.ProgressLog.BlockedUntil; +import accord.coordinate.tracking.AwaitTracker; +import accord.coordinate.tracking.RequestStatus; +import accord.local.Commands; +import accord.local.Node; +import accord.local.Node.Id; +import accord.messages.Await; +import accord.messages.Await.AwaitOk; +import accord.messages.Callback; +import accord.primitives.Route; +import accord.primitives.TxnId; +import accord.primitives.Unseekables; +import accord.topology.Topologies; + +import static accord.coordinate.tracking.RequestStatus.Success; + +public class AsynchronousAwait implements Callback<AwaitOk> Review Comment: This really needs a description as to what it does, but near as I can tell is that it waits for a callback to be registered at *all* replicas of a shard and reports failure if it can't install all of them. And it accepts two different callbacks, the async one and the sync one for whether registration succeeds. The motivation here is that asynchronous await can wait for things that would otherwise his request/response timeouts. -- 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]

