IGNITE-5702: Set CacheWriteSynchronizationMode.FULL_SYNC for predefined CREATE TABLE...
authorAlexander Paschenko <alexander.a.paschenko@gmail.com>
Thu, 6 Jul 2017 09:40:16 +0000 (12:40 +0300)
committerdevozerov <vozerov@gridgain.com>
Thu, 6 Jul 2017 09:40:16 +0000 (12:40 +0300)
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java

index ce6c9fe..d44be2c 100644 (file)
@@ -43,6 +43,7 @@ import org.apache.ignite.binary.Binarylizable;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheKeyConfiguration;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.query.FieldsQueryCursor;
@@ -58,7 +59,6 @@ import org.apache.ignite.internal.NodeStoppingException;
 import org.apache.ignite.internal.managers.communication.GridMessageListener;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheGroupDescriptor;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
@@ -1320,6 +1320,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                 ccfg = new CacheConfiguration<>().setCacheMode(CacheMode.REPLICATED);
             else
                 throw new SchemaOperationException(SchemaOperationException.CODE_CACHE_NOT_FOUND, templateName);
+
+            ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         }
 
         if (!F.isEmpty(ccfg.getQueryEntities()))