ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/2] ignite git commit: WIP.
Date Tue, 21 Mar 2017 12:53:09 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4565-ddl 7df5bedbf -> b2fd40b57


WIP.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/addb2122
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/addb2122
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/addb2122

Branch: refs/heads/ignite-4565-ddl
Commit: addb212230a654cfaf1c6f52ec8c4cd0c93fecfb
Parents: 7df5bed
Author: devozerov <vozerov@gridgain.com>
Authored: Tue Mar 21 15:34:57 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Tue Mar 21 15:34:57 2017 +0300

----------------------------------------------------------------------
 .../cache/DynamicCacheDescriptor.java           | 20 ++++++--------------
 .../processors/cache/GridCacheProcessor.java    |  4 ++--
 .../processors/query/QueryIndexStates.java      |  2 +-
 3 files changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/addb2122/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
index a6de0ec..fdaa8ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
@@ -29,11 +29,9 @@ import org.apache.ignite.internal.processors.query.ddl.IndexAcceptDiscoveryMessa
 import org.apache.ignite.internal.processors.query.ddl.IndexFinishDiscoveryMessage;
 import org.apache.ignite.internal.processors.query.ddl.IndexProposeDiscoveryMessage;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -356,6 +354,8 @@ public class DynamicCacheDescriptor {
         synchronized (idxStatesMux) {
             if (!idxStatesForStartFixed)
                 this.idxStates = idxStates != null ? idxStates.copy() : null;
+
+            // TODO: Validate that both states are compatible?
         }
     }
 
@@ -378,17 +378,13 @@ public class DynamicCacheDescriptor {
      * Try applying accept message.
      *
      * @param msg Message.
-     * @param disco Whether call is performed from discovery thread.
      * @return Result.
      */
-    public boolean tryAccept(IndexAcceptDiscoveryMessage msg, boolean disco) {
+    public boolean tryAccept(IndexAcceptDiscoveryMessage msg) {
         synchronized (idxStatesMux) {
-            if (disco && idxStatesForStartFixed) {
+            if (idxStatesForStartFixed)
                 msg.exchange(true);
 
-                return false;
-            }
-
             if (idxStates == null)
                 idxStates = new QueryIndexStates();
 
@@ -400,17 +396,13 @@ public class DynamicCacheDescriptor {
      * Try applying finish message.
      *
      * @param msg Message.
-     * @param disco Whether call is performed from discovery thread.
      * @return Result.
      */
-    public boolean tryFinish(IndexFinishDiscoveryMessage msg, boolean disco) {
+    public boolean tryFinish(IndexFinishDiscoveryMessage msg) {
         synchronized (idxStatesMux) {
-            if (disco && idxStatesForStartFixed) {
+            if (idxStatesForStartFixed)
                 msg.exchange(true);
 
-                return false;
-            }
-
             if (idxStates == null)
                 idxStates = new QueryIndexStates();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/addb2122/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 82f5f19..5718213 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -2805,7 +2805,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (desc == null)
             return;
 
-        desc.tryAccept(msg, true);
+        desc.tryAccept(msg);
     }
 
     /**
@@ -2821,7 +2821,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (desc == null)
             return;
 
-        desc.tryFinish(msg, true);
+        desc.tryFinish(msg);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/addb2122/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexStates.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexStates.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexStates.java
index 314d9ae..7c955f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexStates.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexStates.java
@@ -75,7 +75,7 @@ public class QueryIndexStates implements Serializable {
     }
 
     /**
-     * Try propose new index operation.
+     * Try propose new index operation. Result is communicated through message error state.
      *
      * @param locNodeId Local node ID.
      * @param msg Propose message.


Mime
View raw message