You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by rp...@apache.org on 2026/03/24 06:34:40 UTC
(ignite-3) branch main updated: IGNITE-28333 Move simple and direct RO handlers to the request handler registry in `PartitionReplicaListener` (#7856)
This is an automated email from the ASF dual-hosted git repository.
rpuch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new b7118369053 IGNITE-28333 Move simple and direct RO handlers to the request handler registry in `PartitionReplicaListener` (#7856)
b7118369053 is described below
commit b7118369053ca09aae46e4c86a84526673e93106
Author: Ivan Zlenko <24...@users.noreply.github.com>
AuthorDate: Tue Mar 24 11:34:34 2026 +0500
IGNITE-28333 Move simple and direct RO handlers to the request handler registry in `PartitionReplicaListener` (#7856)
---
.../replicator/PartitionReplicaListener.java | 31 ++++++++++++++++------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java
index 2ed35daba4b..c67df68cab6 100644
--- a/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java
+++ b/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java
@@ -207,6 +207,7 @@ import org.apache.ignite.internal.tx.impl.FullyQualifiedResourceId;
import org.apache.ignite.internal.tx.impl.RemotelyTriggeredResourceRegistry;
import org.apache.ignite.internal.tx.impl.TransactionStateResolver;
import org.apache.ignite.internal.tx.message.TableWriteIntentSwitchReplicaRequest;
+import org.apache.ignite.internal.tx.message.TxMessageGroup;
import org.apache.ignite.internal.tx.message.TxStatePrimaryReplicaRequest;
import org.apache.ignite.internal.tx.message.WriteIntentSwitchReplicaRequestBase;
import org.apache.ignite.internal.util.Cursor;
@@ -446,6 +447,28 @@ public class PartitionReplicaListener implements ReplicaTableProcessor {
PartitionReplicationMessageGroup.BUILD_INDEX_REPLICA_REQUEST,
new BuildIndexReplicaRequestHandler(indexMetaStorage, raftCommandApplicator));
+ handlersBuilder.addHandler(
+ TxMessageGroup.GROUP_TYPE,
+ TxMessageGroup.TABLE_WRITE_INTENT_SWITCH_REQUEST,
+ (ReplicaRequestHandler<TableWriteIntentSwitchReplicaRequest>) (req, primacy) ->
+ processTableWriteIntentSwitchAction(req));
+
+ handlersBuilder.addHandler(
+ TxMessageGroup.GROUP_TYPE,
+ TxMessageGroup.TX_STATE_PRIMARY_REPLICA_REQUEST,
+ (ReplicaRequestHandler<TxStatePrimaryReplicaRequest>) (req, primacy) ->
+ processTxStatePrimaryReplicaRequest(req));
+
+ handlersBuilder.addRoHandler(
+ PartitionReplicationMessageGroup.GROUP_TYPE,
+ PartitionReplicationMessageGroup.RO_DIRECT_SINGLE_ROW_REPLICA_REQUEST,
+ (ReadOnlyReplicaRequestHandler<ReadOnlyDirectSingleRowReplicaRequest>) this::processReadOnlyDirectSingleEntryAction);
+
+ handlersBuilder.addRoHandler(
+ PartitionReplicationMessageGroup.GROUP_TYPE,
+ PartitionReplicationMessageGroup.RO_DIRECT_MULTI_ROW_REPLICA_REQUEST,
+ (ReadOnlyReplicaRequestHandler<ReadOnlyDirectMultiRowReplicaRequest>) this::processReadOnlyDirectMultiEntryAction);
+
requestHandlers = handlersBuilder.build();
}
@@ -623,20 +646,12 @@ public class PartitionReplicaListener implements ReplicaTableProcessor {
releaseTxLocks(req.transactionId());
}
});
- } else if (request instanceof TableWriteIntentSwitchReplicaRequest) {
- return processTableWriteIntentSwitchAction((TableWriteIntentSwitchReplicaRequest) request);
} else if (request instanceof ReadOnlySingleRowPkReplicaRequest) {
return processReadOnlySingleEntryAction((ReadOnlySingleRowPkReplicaRequest) request, replicaPrimacy.isPrimary());
} else if (request instanceof ReadOnlyMultiRowPkReplicaRequest) {
return processReadOnlyMultiEntryAction((ReadOnlyMultiRowPkReplicaRequest) request, replicaPrimacy.isPrimary());
} else if (request instanceof ReadOnlyScanRetrieveBatchReplicaRequest) {
return processReadOnlyScanRetrieveBatchAction((ReadOnlyScanRetrieveBatchReplicaRequest) request, replicaPrimacy.isPrimary());
- } else if (request instanceof ReadOnlyDirectSingleRowReplicaRequest) {
- return processReadOnlyDirectSingleEntryAction((ReadOnlyDirectSingleRowReplicaRequest) request, opStartTsIfDirectRo);
- } else if (request instanceof ReadOnlyDirectMultiRowReplicaRequest) {
- return processReadOnlyDirectMultiEntryAction((ReadOnlyDirectMultiRowReplicaRequest) request, opStartTsIfDirectRo);
- } else if (request instanceof TxStatePrimaryReplicaRequest) {
- return processTxStatePrimaryReplicaRequest((TxStatePrimaryReplicaRequest) request);
}
// Unknown request.