diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
index 9712ae1690305..fc38969c721dc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
@@ -30,19 +30,11 @@
*
{@link CacheProjection#flagsOn(CacheFlag...)}
* {@link CacheProjection#flagsOff(CacheFlag...)}
*
- * Also, some flags, like {@link #LOCAL}, or {@link #READ} may be implicitly set whenever
+ * Also, some flags, like {@link #READ} may be implicitly set whenever
* creating new projections and passing entries to predicate filters.
*/
public enum CacheFlag {
- /**
- * Only operations that don't require any communication with
- * other cache nodes are allowed. This flag is automatically set
- * on underlying projection for all the entries that are given to
- * predicate filters to make sure that no distribution happens
- * from inside of predicate evaluation.
- */
LOCAL,
-
/**
* Only operations that don't change cached data are allowed.
* This flag is automatically set on underlying projection for
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index 6659735df916c..768edbecfa703 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -443,8 +443,6 @@ public interface CacheProjection extends Iterable> {
*
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
- *
- * This method is not available if {@link CacheFlag#LOCAL} flag is set on projection.
*
* @param key Key to retrieve the value for.
* @return Value for the given key.
@@ -468,8 +466,6 @@ public interface CacheProjection extends Iterable> {
*
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
- *
- * This method is not available if {@link CacheFlag#LOCAL} flag is set on projection.
*
* @param key Key for the value to get.
* @return Future for the get operation.
@@ -492,8 +488,6 @@ public interface CacheProjection extends Iterable> {
*
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
- *
- * This method is not available if {@link CacheFlag#LOCAL} flag is set on projection.
*
* @param keys Keys to get.
* @return Map of key-value pairs.
@@ -516,8 +510,6 @@ public interface CacheProjection extends Iterable> {
*
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
- *
- * This method is not available if {@link CacheFlag#LOCAL} flag is set on projection.
*
* @param keys Key for the value to get.
* @return Future for the get operation.
@@ -546,7 +538,7 @@ public interface CacheProjection extends Iterable> {
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -585,7 +577,7 @@ public interface CacheProjection extends Iterable> {
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -614,7 +606,7 @@ public interface CacheProjection extends Iterable> {
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -647,7 +639,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -681,7 +673,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -712,7 +704,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -738,7 +730,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -764,7 +756,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -793,7 +785,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -823,7 +815,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -848,7 +840,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -874,7 +866,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
@@ -897,7 +889,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param oldVal Old value to match.
@@ -922,7 +914,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to store in cache.
* @param oldVal Old value to match.
@@ -945,7 +937,7 @@ public boolean putx(K key, V val, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param m Key-value pairs to store in cache.
* @param filter Optional entry filter. If provided, then entry will
@@ -968,7 +960,7 @@ public void putAll(@Nullable Map extends K, ? extends V> m,
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param m Key-value pairs to store in cache.
* @param filter Optional entry filter. If provided, then entry will
@@ -1361,7 +1353,7 @@ public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1394,7 +1386,7 @@ public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1418,7 +1410,7 @@ public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolat
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1445,7 +1437,7 @@ public boolean removex(K key, @Nullable CacheEntryPredicate... filter)
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1469,7 +1461,7 @@ public IgniteInternalFuture removexAsync(K key,
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param val Value to match against currently cached value.
@@ -1494,7 +1486,7 @@ public IgniteInternalFuture removexAsync(K key,
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key whose mapping is to be removed from cache.
* @param val Value to match against currently cached value.
@@ -1516,7 +1508,7 @@ public IgniteInternalFuture removexAsync(K key,
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param keys Keys whose mappings are to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1538,7 +1530,7 @@ public void removeAll(@Nullable Collection extends K> keys,
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param keys Keys whose mappings are to be removed from cache.
* @param filter Optional filter to check prior to removing value form cache. Note
@@ -1567,7 +1559,7 @@ public IgniteInternalFuture> removeAllAsync(@Nullable Collection extends K>
* if there is one.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @throws IgniteCheckedException If remove failed.
* @throws CacheFlagException If flags validation failed.
@@ -1595,7 +1587,7 @@ public IgniteInternalFuture> removeAllAsync(@Nullable Collection extends K>
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to lock.
* @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1621,7 +1613,7 @@ public boolean lock(K key, long timeout, @Nullable CacheEntryPredicate... filter
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to lock.
* @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1647,7 +1639,7 @@ public IgniteInternalFuture lockAsync(K key, long timeout,
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param keys Keys to lock.
* @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1673,7 +1665,7 @@ public boolean lockAll(@Nullable Collection extends K> keys, long timeout,
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param keys Keys to lock.
* @param timeout Timeout in milliseconds to wait for lock to be acquired
@@ -1699,7 +1691,7 @@ public IgniteInternalFuture lockAllAsync(@Nullable Collection extends
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param key Key to unlock.
* @param filter Optional filter that needs to pass prior to unlock taking effect.
@@ -1720,7 +1712,7 @@ public IgniteInternalFuture lockAllAsync(@Nullable Collection extends
* which will acquire explicit locks for relevant cache operations.
*
* This method is not available if any of the following flags are set on projection:
- * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}.
+ * {@link CacheFlag#READ}.
*
* @param keys Keys to unlock.
* @param filter Optional filter which needs to pass for individual entries
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 9a5b2a0341481..fad90de38d40b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -1597,8 +1597,6 @@ private boolean evictx(K key, GridCacheVersion ver,
/** {@inheritDoc} */
@Override public V getForcePrimary(K key) throws IgniteCheckedException {
- ctx.denyOnFlag(LOCAL);
-
String taskName = ctx.kernalContext().job().currentTaskName();
return getAllAsync(F.asList(key), /*force primary*/true, /*skip tx*/false, null, null, taskName, true, false)
@@ -1607,8 +1605,6 @@ private boolean evictx(K key, GridCacheVersion ver,
/** {@inheritDoc} */
@Override public IgniteInternalFuture getForcePrimaryAsync(final K key) {
- ctx.denyOnFlag(LOCAL);
-
String taskName = ctx.kernalContext().job().currentTaskName();
return getAllAsync(Collections.singletonList(key), /*force primary*/true, /*skip tx*/false, null, null,
@@ -2040,9 +2036,7 @@ public IgniteInternalFuture