denis-chudov commented on code in PR #7349: URL: https://github.com/apache/ignite-3/pull/7349#discussion_r2743553625
########## modules/transactions/src/integrationTest/java/org/apache/ignite/internal/tx/impl/ItTransactionLabelLoggingTest.java: ########## @@ -0,0 +1,72 @@ +/* + * 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.tx.impl; + +import static org.awaitility.Awaitility.await; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.is; + +import java.time.Duration; +import java.util.concurrent.atomic.AtomicInteger; +import org.apache.ignite.Ignite; +import org.apache.ignite.internal.ClusterPerTestIntegrationTest; +import org.apache.ignite.internal.testframework.log4j2.LogInspector; +import org.apache.ignite.tx.TransactionOptions; +import org.junit.jupiter.api.Test; + +/** + * Test to verify that transaction labels appear in logs for various negative scenarios. + */ +public class ItTransactionLabelLoggingTest extends ClusterPerTestIntegrationTest { Review Comment: Could you please add a test showing that tx labels are propagated to primary replica nodes? ########## modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java: ########## @@ -1803,6 +1810,25 @@ protected CompletableFuture<Void> onClose(boolean intentionallyClose, long scanI }; } + /** + * Updates transaction meta with the label and commit partition, if a label is present. + * + * <p>This is used for tracking labeled transactions in the meta storage; unlabeled transactions are ignored. + * + * @param txContext Transaction context. + * @param commitPartition Commit partition to record (may be {@code null}). + */ + private void updateLabel(TxContext txContext, @Nullable ZonePartitionId commitPartition) { Review Comment: Why only used in scans? Please propagate tx labels from transaction options to every request in this class, as a field of ReadWriteReplicaRequest. -- 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]
