ascherbakoff commented on code in PR #6779: URL: https://github.com/apache/ignite-3/pull/6779#discussion_r2536568210
########## modules/client/src/main/java/org/apache/ignite/internal/client/table/ClientTableMapUtils.java: ########## @@ -0,0 +1,243 @@ +/* + * 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 org.apache.ignite.internal.client.table; + +import static org.apache.ignite.internal.client.proto.ProtocolBitmaskFeature.TX_CLIENT_GETALL_SUPPORTS_PRIORITY; +import static org.apache.ignite.internal.util.ExceptionUtils.unwrapCause; +import static org.apache.ignite.lang.ErrorGroups.Transactions.ACQUIRE_LOCK_ERR; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.TimeUnit; +import org.apache.ignite.internal.client.table.ClientTable.Batch; +import org.apache.ignite.internal.client.table.ClientTable.Reducer; +import org.apache.ignite.internal.client.tx.ClientLazyTransaction; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.util.CompletableFutures; +import org.apache.ignite.internal.util.ExceptionUtils; +import org.apache.ignite.tx.Transaction; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Provides batch map utility methods. + */ +class ClientTableMapUtils { + // TODO https://issues.apache.org/jira/browse/IGNITE-27073 + private static final long DEFAULT_IMPLICIT_GET_ALL_TIMEOUT_NANOS = TimeUnit.MILLISECONDS.toNanos(5000); Review Comment: This timeout is specific only for **implicit transactions, coordinated from a client.** Only two types of operations (getAll/containsAll) are executed using this approach, so I see no inconsistent behavior. 5 seconds is more than enought here and there is a ticket link (above) to use server side default timeout. TC is green, nothing broken. It's not possible to use RetryPolicy here because it's about broken connection and aforementioned tx timeout is on whole transaction - we should't mix that. Moreover, current behavior is intentional and consistent with server side implicit transaction behavior (except default timeout value, which has TODO ticket). -- 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]
