usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject usergrid git commit: Add configuration to disable unique value verification using Akka clustering.
Date Mon, 23 Jan 2017 09:18:20 GMT
Repository: usergrid
Updated Branches:
  refs/heads/master 2f7b0ee36 -> e3ab2551e


Add configuration to disable unique value verification using Akka clustering.


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

Branch: refs/heads/master
Commit: e3ab2551e6f39aa4671e133a2cfa2777a69d118e
Parents: 2f7b0ee
Author: Michael Russo <mrusso@apigee.com>
Authored: Mon Jan 23 01:17:58 2017 -0800
Committer: Michael Russo <mrusso@apigee.com>
Committed: Mon Jan 23 01:17:58 2017 -0800

----------------------------------------------------------------------
 .../collection/mvcc/stage/write/WriteCommit.java            | 2 +-
 .../collection/mvcc/stage/write/WriteUniqueVerify.java      | 2 +-
 .../collection/uniquevalues/UniqueValuesFig.java            | 9 +++++++++
 3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/e3ab2551/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
index edd44e8..c32e88f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
@@ -148,7 +148,7 @@ public class WriteCommit implements Func1<CollectionIoEvent<MvccEntity>,
Collect
         logMutation.mergeShallow( entityMutation );
 
         // akkaFig may be null when this is called from JUnit tests
-        if ( actorSystemFig != null && actorSystemFig.getEnabled() ) {
+        if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster()
) {
             String authoritativeRegion = ioEvent.getAuthoritativeRegion();
             if ( StringUtils.isEmpty(authoritativeRegion) ) {
                 authoritativeRegion = uniqueValuesFig.getAuthoritativeRegion();

http://git-wip-us.apache.org/repos/asf/usergrid/blob/e3ab2551/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 7ef573d..7cbdd13 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -115,7 +115,7 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
 
     @Override
     public void call( final CollectionIoEvent<MvccEntity> ioevent ) {
-        if ( actorSystemFig != null && actorSystemFig.getEnabled() ) {
+        if ( actorSystemFig != null && actorSystemFig.getEnabled() && uniqueValuesFig.getUnqiueValueViaCluster()
) {
             verifyUniqueFieldsAkka( ioevent );
         } else {
             verifyUniqueFields( ioevent );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/e3ab2551/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesFig.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesFig.java
index a220adc..fca4c2a 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesFig.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesFig.java
@@ -28,6 +28,8 @@ import java.io.Serializable;
 @FigSingleton
 public interface UniqueValuesFig extends GuicyFig, Serializable {
 
+    String UNIQUEVALUE_USE_CLUSTER = "collection.uniquevalues.usecluster";
+
     String UNIQUEVALUE_ACTORS = "collection.uniquevalues.actors";
 
     String UNIQUEVALUE_CACHE_TTL = "collection.uniquevalues.cache.ttl";
@@ -42,6 +44,13 @@ public interface UniqueValuesFig extends GuicyFig, Serializable {
 
 
     /**
+     * Tells Usergrid whether or not to use the Akka Cluster sytem to verify unique values
( more consistent)
+     */
+    @Key(UNIQUEVALUE_USE_CLUSTER)
+    @Default("false")
+    boolean getUnqiueValueViaCluster();
+
+    /**
      * Unique Value cache TTL in seconds.
      */
     @Key(UNIQUEVALUE_CACHE_TTL)


Mime
View raw message