This is an automated email from the ASF dual-hosted git repository.
av pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 33fcc99e70e IGNITE-21826 Remove MvccCoordinator and MvccFuture (#11314)
33fcc99e70e is described below
commit 33fcc99e70e33fe7090fcdf04f19e1f4e4215a72
Author: Julia Bakulina <[email protected]>
AuthorDate: Tue Apr 16 17:50:32 2024 +0300
IGNITE-21826 Remove MvccCoordinator and MvccFuture (#11314)
---
.../distributed/dht/GridDhtTxFinishFuture.java | 19 ---
.../distributed/near/GridNearTxFinishFuture.java | 6 -
.../processors/cache/mvcc/MvccCoordinator.java | 156 ---------------------
.../internal/processors/cache/mvcc/MvccFuture.java | 66 ---------
.../processors/cache/mvcc/MvccSnapshotFuture.java | 43 ------
.../cache/mvcc/MvccSnapshotResponseListener.java | 35 -----
.../main/resources/META-INF/classnames.properties | 1 -
7 files changed, 326 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index d0b68939908..405a5635224 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -34,7 +34,6 @@ import
org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
import
org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccFuture;
import
org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -621,17 +620,6 @@ public final class GridDhtTxFinishFuture<K, V> extends
GridCacheCompoundIdentity
return;
}
}
- else if (fut instanceof MvccFuture) {
- MvccFuture f = (MvccFuture)fut;
-
- if (!cctx.localNodeId().equals(f.coordinatorNodeId()))
{
- ctx.basicInfo(f.coordinatorNodeId(),
"GridDhtTxFinishFuture " +
- "waiting for mvcc coordinator reply
[mvccCrdNode=" + f.coordinatorNodeId() +
- ", loc=" +
f.coordinatorNodeId().equals(cctx.localNodeId()) + ']');
-
- return;
- }
- }
}
}
}
@@ -645,13 +633,6 @@ public final class GridDhtTxFinishFuture<K, V> extends
GridCacheCompoundIdentity
", loc=" + ((MiniFuture)f).node().isLocal() +
", done=" + f.isDone() + "]";
}
- else if (f instanceof MvccFuture) {
- MvccFuture crdFut = (MvccFuture)f;
-
- return "[mvccCrdNode=" + crdFut.coordinatorNodeId() +
- ", loc=" +
crdFut.coordinatorNodeId().equals(cctx.localNodeId()) +
- ", done=" + f.isDone() + "]";
- }
else
return f.toString();
});
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index 741428ee34a..45d0176c7f7 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -40,7 +40,6 @@ import
org.apache.ignite.internal.processors.cache.GridCacheVersionedFuture;
import
org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
import
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishRequest;
import
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishResponse;
-import org.apache.ignite.internal.processors.cache.mvcc.MvccFuture;
import
org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.tracing.MTC;
@@ -854,11 +853,6 @@ public final class GridNearTxFinishFuture<K, V> extends
GridCacheCompoundIdentit
return "CheckRemoteTxMiniFuture[nodes=" + fut.nodes() + ",
done=" + f.isDone() + "]";
}
- else if (f instanceof MvccFuture) {
- MvccFuture fut = (MvccFuture)f;
-
- return "WaitPreviousTxsFut[mvccCrd=" + fut.coordinatorNodeId()
+ ", done=" + f.isDone() + "]";
- }
else
return "[loc=true, done=" + f.isDone() + "]";
});
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCoordinator.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCoordinator.java
deleted file mode 100644
index c724da0482b..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccCoordinator.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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.processors.cache.mvcc;
-
-import java.io.Serializable;
-import java.util.UUID;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- *
- */
-public class MvccCoordinator implements Serializable {
- /** */
- public static final MvccCoordinator DISCONNECTED_COORDINATOR =
- new MvccCoordinator(AffinityTopologyVersion.NONE, null, 0, false);
-
- /** */
- public static final MvccCoordinator UNASSIGNED_COORDINATOR =
- new MvccCoordinator(AffinityTopologyVersion.NONE, null, 0, false);
-
- /** */
- private static final long serialVersionUID = 0L;
-
- /** */
- @GridToStringInclude
- private final AffinityTopologyVersion topVer;
-
- /** */
- private final UUID nodeId;
-
- /**
- * Unique coordinator version, increases when new coordinator is assigned,
- * can differ from topVer if we decide to assign coordinator manually.
- */
- private final long ver;
-
- /** */
- private final boolean local;
-
- /** */
- private volatile boolean initialized;
-
- /**
- * @param topVer Topology version when coordinator was assigned.
- * @param nodeId Coordinator node ID.
- * @param ver Coordinator version.
- * @param local {@code True} if the local node is a coordinator.
- */
- public MvccCoordinator(AffinityTopologyVersion topVer, UUID nodeId, long
ver, boolean local) {
- this.topVer = topVer;
- this.nodeId = nodeId;
- this.ver = ver;
- this.local = local;
- }
-
- /**
- * @return Topology version when coordinator was assigned.
- */
- public AffinityTopologyVersion topologyVersion() {
- return topVer;
- }
-
- /**
- * @return Coordinator node ID.
- */
- public UUID nodeId() {
- return nodeId;
- }
-
- /**
- * @return Unique coordinator version.
- */
- public long version() {
- return ver;
- }
-
- /**
- *
- * @return {@code True} if the coordinator is local.
- */
- public boolean local() {
- return local;
- }
-
- /**
- *
- * @return {@code True} if the coordinator is disconnected.
- */
- public boolean disconnected() {
- return this == DISCONNECTED_COORDINATOR;
- }
-
- /**
- *
- * @return {@code True} if the coordinator has not been assigned yet.
- */
- public boolean unassigned() {
- return this == UNASSIGNED_COORDINATOR;
- }
-
- /**
- *
- * @return {@code True} if the coordinator is initialized.
- */
- public boolean initialized() {
- return initialized;
- }
-
- /**
- *
- * @param initialized Initialized flag.
- */
- public void initialized(boolean initialized) {
- this.initialized = initialized;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (o == null || getClass() != o.getClass())
- return false;
-
- MvccCoordinator that = (MvccCoordinator)o;
-
- return ver == that.ver;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- return (int)(ver ^ (ver >>> 32));
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MvccCoordinator.class, this);
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccFuture.java
deleted file mode 100644
index 0ca82d3a47f..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccFuture.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.processors.cache.mvcc;
-
-import java.util.UUID;
-import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- *
- */
-public class MvccFuture<T> extends GridFutureAdapter<T> {
- /** */
- protected UUID crdId;
-
- /**
- * Default constructor.
- */
- public MvccFuture() {
- }
-
- /**
- * @param crdId MVCC coordinator node ID.
- */
- public MvccFuture(UUID crdId) {
- assert crdId != null;
-
- this.crdId = crdId;
- }
-
- /**
- * @return MVCC coordinator node ID.
- */
- public UUID coordinatorNodeId() {
- return crdId;
- }
-
- /**
- * @param crdId MVCC coordinator node ID.
- */
- public void coordinatorNodeId(UUID crdId) {
- assert crdId != null;
-
- this.crdId = crdId;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MvccFuture.class, this, super.toString());
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotFuture.java
deleted file mode 100644
index 934ff2fc8b1..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotFuture.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.processors.cache.mvcc;
-
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- *
- */
-public class MvccSnapshotFuture extends MvccFuture<MvccSnapshot> implements
MvccSnapshotResponseListener {
- /** {@inheritDoc} */
- @Override public void onResponse(MvccSnapshot res) {
- assert res != null;
-
- onDone(res);
- }
-
- /** {@inheritDoc} */
- @Override public void onError(IgniteCheckedException err) {
- onDone(err);
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(MvccSnapshotFuture.class, this, super.toString());
- }
-}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotResponseListener.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotResponseListener.java
deleted file mode 100644
index e0bf448fc3f..00000000000
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccSnapshotResponseListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.processors.cache.mvcc;
-
-import org.apache.ignite.IgniteCheckedException;
-
-/**
- *
- */
-public interface MvccSnapshotResponseListener {
- /**
- * @param res Version.
- */
- public void onResponse(MvccSnapshot res);
-
- /**
- * @param e Error.
- */
- public void onError(IgniteCheckedException e);
-}
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties
b/modules/core/src/main/resources/META-INF/classnames.properties
index 3a28e69162a..266524b6897 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1122,7 +1122,6 @@
org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteT
org.apache.ignite.internal.processors.cache.dr.GridCacheDrExpirationInfo
org.apache.ignite.internal.processors.cache.dr.GridCacheDrInfo
org.apache.ignite.internal.processors.cache.mvcc.DeadlockProbe
-org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator
org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot
org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshotWithoutTxs
org.apache.ignite.internal.processors.cache.mvcc.MvccVersionImpl