You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2020/02/17 05:54:20 UTC

[ignite] branch master updated: IGNITE-12650 Mark MVCC with @IgniteExperimental - Fixes #7419.

This is an automated email from the ASF dual-hosted git repository.

agoncharuk 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 99ac71d  IGNITE-12650 Mark MVCC with @IgniteExperimental - Fixes #7419.
99ac71d is described below

commit 99ac71dfecfcae4a09716628ae13fe1ff4efcb76
Author: Alexey Goncharuk <al...@gmail.com>
AuthorDate: Mon Feb 17 08:53:07 2020 +0300

    IGNITE-12650 Mark MVCC with @IgniteExperimental - Fixes #7419.
    
    Signed-off-by: Alexey Goncharuk <al...@gmail.com>
---
 .../java/org/apache/ignite/cache/CacheAtomicityMode.java    |  4 ++++
 .../apache/ignite/configuration/IgniteConfiguration.java    | 13 +++++++++++++
 .../ignite/configuration/TransactionConfiguration.java      |  7 +++++++
 .../java/org/apache/ignite/lang/IgniteExperimental.java     |  3 ++-
 .../cache/distributed/CacheExchangeMergeTest.java           |  7 +++----
 .../Cache/Configuration/CacheAtomicityMode.cs               |  4 ++++
 .../Common/IgniteExperimentalAttribute.cs                   |  3 ++-
 .../dotnet/Apache.Ignite.Core/IgniteConfiguration.cs        |  6 ++++++
 .../Transactions/TransactionConfiguration.cs                |  7 ++++++-
 9 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
index 5b101bf..4705531 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
@@ -19,6 +19,7 @@ package org.apache.ignite.cache;
 
 import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.lang.IgniteExperimental;
 import org.apache.ignite.transactions.Transaction;
 import org.jetbrains.annotations.Nullable;
 
@@ -99,6 +100,8 @@ public enum CacheAtomicityMode {
     ATOMIC,
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Specifies fully {@code ACID}-compliant transactional cache behavior for both key-value API and SQL transactions.
      * <p>
      * This atomicity mode enables multiversion concurrency control (MVCC) for the cache. In MVCC-enabled caches,
@@ -119,6 +122,7 @@ public enum CacheAtomicityMode {
      * <p>
      * See {@link Transaction} for more information about transactions.
      */
+    @IgniteExperimental
     TRANSACTIONAL_SNAPSHOT;
 
     /** Enumerated values. */
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 22754e9..a086e04 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -51,6 +51,7 @@ import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteAsyncCallback;
+import org.apache.ignite.lang.IgniteExperimental;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.lifecycle.LifecycleBean;
@@ -3431,20 +3432,26 @@ public class IgniteConfiguration {
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Returns number of MVCC vacuum threads.
      *
      * @return Number of MVCC vacuum threads.
      */
+    @IgniteExperimental
     public int getMvccVacuumThreadCount() {
         return mvccVacuumThreadCnt;
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Sets number of MVCC vacuum threads.
      *
      * @param mvccVacuumThreadCnt Number of MVCC vacuum threads.
      * @return {@code this} for chaining.
      */
+    @IgniteExperimental
     public IgniteConfiguration setMvccVacuumThreadCount(int mvccVacuumThreadCnt) {
         this.mvccVacuumThreadCnt = mvccVacuumThreadCnt;
 
@@ -3452,20 +3459,26 @@ public class IgniteConfiguration {
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Returns time interval between MVCC vacuum runs in milliseconds.
      *
      * @return Time interval between MVCC vacuum runs in milliseconds.
      */
+    @IgniteExperimental
     public long getMvccVacuumFrequency() {
         return mvccVacuumFreq;
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Sets time interval between MVCC vacuum runs in milliseconds.
      *
      * @param mvccVacuumFreq Time interval between MVCC vacuum runs in milliseconds.
      * @return {@code this} for chaining.
      */
+    @IgniteExperimental
     public IgniteConfiguration setMvccVacuumFrequency(long mvccVacuumFreq) {
         this.mvccVacuumFreq = mvccVacuumFreq;
 
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 91048eaf..7058890 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -23,6 +23,7 @@ import javax.cache.configuration.Factory;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.internal.util.TransientSerializable;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.lang.IgniteExperimental;
 import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -255,6 +256,8 @@ public class TransactionConfiguration implements Serializable {
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Transaction deadlocks occurred for caches configured with {@link CacheAtomicityMode#TRANSACTIONAL_SNAPSHOT}
      * can be resolved automatically.
      * <p>
@@ -266,11 +269,14 @@ public class TransactionConfiguration implements Serializable {
      *
      * @return Timeout before starting deadlock detection.
      */
+    @IgniteExperimental
     public long getDeadlockTimeout() {
         return deadlockTimeout;
     }
 
     /**
+     * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b>
+     * <p>
      * Sets a timeout before starting deadlock detection for caches configured with
      * {@link CacheAtomicityMode#TRANSACTIONAL_SNAPSHOT}.
      * <p>
@@ -280,6 +286,7 @@ public class TransactionConfiguration implements Serializable {
      * @param deadlockTimeout Timeout value in milliseconds.
      * @return {@code this} for chaining.
      */
+    @IgniteExperimental
     public TransactionConfiguration setDeadlockTimeout(long deadlockTimeout) {
         this.deadlockTimeout = deadlockTimeout;
 
diff --git a/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java b/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java
index 5134ccd..c68fe14 100644
--- a/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java
+++ b/modules/core/src/main/java/org/apache/ignite/lang/IgniteExperimental.java
@@ -20,6 +20,7 @@ package org.apache.ignite.lang;
 import java.lang.annotation.Target;
 
 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.ElementType.PACKAGE;
 import static java.lang.annotation.ElementType.TYPE;
@@ -32,6 +33,6 @@ import static java.lang.annotation.ElementType.TYPE;
  * that an API element should be "eventually" stabilized. Incompatible changes are allowed for such APIs: API may be
  * removed, changed or stabilized in future Ignite releases (both minor and maintenance).
  */
-@Target(value = {TYPE, METHOD, ANNOTATION_TYPE, PACKAGE})
+@Target(value = {TYPE, METHOD, ANNOTATION_TYPE, PACKAGE, FIELD})
 public @interface IgniteExperimental {
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index 909325c..bc9a9c3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -1270,9 +1270,8 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
      */
-    private void checkAffinity() throws Exception {
+    private void checkAffinity() {
         List<Ignite> nodes = G.allGrids();
 
         ClusterNode crdNode = null;
@@ -1284,7 +1283,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
                 crdNode = locNode;
         }
 
-        AffinityTopologyVersion topVer = ((IgniteKernal)grid(crdNode)).
+        AffinityTopologyVersion topVer = ((IgniteEx)grid(crdNode)).
             context().cache().context().exchange().readyAffinityVersion();
 
         Map<String, List<List<ClusterNode>>> affMap = new HashMap<>();
@@ -1292,7 +1291,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
         for (Ignite node : nodes) {
             IgniteKernal node0 = (IgniteKernal)node;
 
-            for (IgniteInternalCache cache : node0.context().cache().caches()) {
+            for (IgniteInternalCache<?, ?> cache : node0.context().cache().caches()) {
                 List<List<ClusterNode>> aff = affMap.get(cache.name());
                 List<List<ClusterNode>> aff0 = cache.context().affinity().assignments(topVer);
 
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
index 49e5d12..50bcf35 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheAtomicityMode.cs
@@ -18,6 +18,7 @@
 namespace Apache.Ignite.Core.Cache.Configuration
 {
     using Apache.Ignite.Core.Cache;
+    using Apache.Ignite.Core.Common;
 
     /// <summary>
     /// Cache atomicity mode.
@@ -59,6 +60,8 @@ namespace Apache.Ignite.Core.Cache.Configuration
         Atomic,
 
         /// <summary>
+        /// This is an experimental feature. Transactional SQL is currently in a beta status.
+        /// <para/>
         /// Specifies fully ACID-compliant transactional cache behavior for both key-value API and SQL transactions.
         /// <para/>
         /// This atomicity mode enables multiversion concurrency control (MVCC) for the cache. In MVCC-enabled caches,
@@ -77,6 +80,7 @@ namespace Apache.Ignite.Core.Cache.Configuration
         /// If a transaction is executed over multiple caches, all caches must have the same atomicity mode,
         /// either TRANSACTIONAL_SNAPSHOT or TRANSACTIONAL.
         /// </summary>
+        [IgniteExperimentalAttribute]
         TransactionalSnapshot,
     }
 }
\ No newline at end of file
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs
index ea82804..81b0e51 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Common/IgniteExperimentalAttribute.cs
@@ -28,7 +28,8 @@ namespace Apache.Ignite.Core.Common
     /// allowed for such APIs: API may be removed, changed or stabilized in future Ignite releases
     /// (both minor and maintenance).
     /// </summary>
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Enum | 
+                    AttributeTargets.Property | AttributeTargets.Field)]
     public sealed class IgniteExperimentalAttribute : Attribute
     {
         // No-op.
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 16cff50..b1a3faf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -1655,9 +1655,12 @@ namespace Apache.Ignite.Core
         }
 
         /// <summary>
+        /// This is an experimental feature. Transactional SQL is currently in a beta status.
+        /// <para/>
         /// Time interval between MVCC vacuum runs in milliseconds.
         /// </summary>
         [DefaultValue(DefaultMvccVacuumFrequency)]
+        [IgniteExperimentalAttribute]
         public long MvccVacuumFrequency
         {
             get { return _mvccVacuumFreq ?? DefaultMvccVacuumFrequency; }
@@ -1665,9 +1668,12 @@ namespace Apache.Ignite.Core
         }
 
         /// <summary>
+        /// This is an experimental feature. Transactional SQL is currently in a beta status.
+        /// <para/>
         /// Number of MVCC vacuum threads.
         /// </summary>
         [DefaultValue(DefaultMvccVacuumThreadCount)]
+        [IgniteExperimentalAttribute]
         public int MvccVacuumThreadCount
         {
             get { return _mvccVacuumThreadCnt ?? DefaultMvccVacuumThreadCount; }
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
index 7220211..5c2c3a7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Transactions/TransactionConfiguration.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Transactions
 {
     using System;
     using System.ComponentModel;
+    using Apache.Ignite.Core.Common;
 
     /// <summary>
     /// Transactions configuration.
@@ -87,10 +88,14 @@ namespace Apache.Ignite.Core.Transactions
         public TimeSpan DefaultTimeoutOnPartitionMapExchange { get; set; }
 
         /// <summary>
-        /// Gets or sets timeout before starting deadlock detection.
+        /// This is an experimental feature. Transactional SQL is currently in a beta status.
+        /// <para/>
+        /// Gets or sets timeout before starting deadlock detection for caches configured with
+        /// <code>TransactionalSnapshot</code> cache atomicity mode.
         /// <see cref="TimeSpan.Zero"/> for disabling deadlock detection.
         /// </summary>
         [DefaultValue(typeof(TimeSpan), "00:00:10")]
+        [IgniteExperimentalAttribute]
         public TimeSpan DeadlockTimeout { get; set; }
 
         /// <summary>