sanpwc commented on code in PR #5484: URL: https://github.com/apache/ignite-3/pull/5484#discussion_r2010072440
########## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/TableAwareReplicaRequestPreProcessor.java: ########## @@ -0,0 +1,186 @@ +/* + * 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.partition.replicator; + +import static org.apache.ignite.internal.lang.IgniteSystemProperties.enabledColocation; + +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import org.apache.ignite.internal.hlc.ClockService; +import org.apache.ignite.internal.hlc.HybridTimestamp; +import org.apache.ignite.internal.partition.replicator.network.replication.BuildIndexReplicaRequest; +import org.apache.ignite.internal.partition.replicator.network.replication.GetEstimatedSizeRequest; +import org.apache.ignite.internal.partition.replicator.network.replication.ReadOnlyReplicaRequest; +import org.apache.ignite.internal.partition.replicator.network.replication.ReadWriteReplicaRequest; +import org.apache.ignite.internal.partition.replicator.network.replication.ScanCloseReplicaRequest; +import org.apache.ignite.internal.partition.replicator.schemacompat.SchemaCompatibilityValidator; +import org.apache.ignite.internal.replicator.message.ReadOnlyDirectReplicaRequest; +import org.apache.ignite.internal.replicator.message.ReplicaRequest; +import org.apache.ignite.internal.replicator.message.SchemaVersionAwareReplicaRequest; +import org.apache.ignite.internal.replicator.message.TableAware; +import org.apache.ignite.internal.schema.SchemaSyncService; +import org.apache.ignite.internal.tx.TransactionIds; +import org.apache.ignite.internal.tx.message.TableWriteIntentSwitchReplicaRequest; +import org.jetbrains.annotations.Nullable; + +/** + * TableAware requests pre processor. + */ +public class TableAwareReplicaRequestPreProcessor { + private final ClockService clockService; + + private final SchemaCompatibilityValidator schemaCompatValidator; + + private final SchemaSyncService schemaSyncService; + + /** Constructor. */ + public TableAwareReplicaRequestPreProcessor( + ClockService clockService, + SchemaCompatibilityValidator schemaCompatValidator, + SchemaSyncService schemaSyncService + ) { + this.clockService = clockService; + this.schemaCompatValidator = schemaCompatValidator; + this.schemaSyncService = schemaSyncService; + } + + /** + * Pre processes {@link TableAware} request. Review Comment: Following added `Pre processes {@link TableAware} request. In other words perform general for all TableAware requests part of the logic like schema awaiting.` I don't want to be to specific one because we may add or exclude processing steps later and likely will forget to update the javadoc. Thus I'd rather leave it as generic one. -- 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]
