You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/05/22 15:12:35 UTC
[07/50] [abbrv] ignite git commit: Merged ignite-2.0 into gg-8.0.4.ea2
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index 69326b4,1d968c5..87303ea
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@@ -263,10 -284,10 +284,10 @@@ public class PageMemoryNoStoreImpl impl
throw new IgniteOutOfMemoryException("Not enough memory allocated " +
"(consider increasing memory policy size or enabling evictions) " +
"[policyName=" + memoryPolicyCfg.getName() +
- ", size=" + U.readableSize(memoryPolicyCfg.getSize(), true) + "]"
+ ", size=" + U.readableSize(memoryPolicyCfg.getMaxSize(), true) + "]"
);
- assert (relPtr & ~PageIdUtils.PAGE_IDX_MASK) == 0;
+ assert (relPtr & ~PageIdUtils.PAGE_IDX_MASK) == 0 : U.hexLong(relPtr & ~PageIdUtils.PAGE_IDX_MASK);
// Assign page ID according to flags and partition ID.
long pageId = PageIdUtils.pageId(partId, flags, (int)relPtr);
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheClusterMetricsMXBeanImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLocalMetricsMXBeanImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index 48e1d2f,d4ad8e4..2ee8cc4
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@@ -97,36 -89,6 +97,21 @@@ public class CacheMetricsImpl implement
/** Number of off-heap misses. */
private AtomicLong offHeapMisses = new AtomicLong();
- /** Number of reads from swap. */
- private AtomicLong swapGets = new AtomicLong();
-
- /** Number of writes to swap. */
- private AtomicLong swapPuts = new AtomicLong();
-
- /** Number of removed entries from swap. */
- private AtomicLong swapRemoves = new AtomicLong();
-
- /** Number of swap hits. */
- private AtomicLong swapHits = new AtomicLong();
-
- /** Number of swap misses. */
- private AtomicLong swapMisses = new AtomicLong();
-
+ /** Rebalanced keys count. */
+ private AtomicLong rebalancedKeys = new AtomicLong();
+
+ /** Total rebalanced bytes count. */
+ private AtomicLong totalRebalancedBytes = new AtomicLong();
+
+ /** Estimated rebalancing keys count. */
+ private AtomicLong estimatedRebalancingKeys = new AtomicLong();
+
+ /** Rebalancing rate in keys. */
+ private HitRateMetrics rebalancingKeysRate = new HitRateMetrics(REBALANCE_RATE_INTERVAL, 20);
+
+ /** Rebalancing rate in bytes. */
+ private HitRateMetrics rebalancingBytesRate = new HitRateMetrics(REBALANCE_RATE_INTERVAL, 20);
+
/** Cache metrics. */
@GridToStringExclude
private transient CacheMetricsImpl delegate;
@@@ -458,14 -415,6 +438,8 @@@
offHeapMisses.set(0);
offHeapEvicts.set(0);
- swapGets.set(0);
- swapPuts.set(0);
- swapRemoves.set(0);
- swapHits.set(0);
- swapMisses.set(0);
-
+ clearRebalanceCounters();
+
if (delegate != null)
delegate.clear();
}
@@@ -738,98 -687,10 +712,104 @@@
return ccfg != null && ccfg.isManagementEnabled();
}
+ /** {@inheritDoc} */
+ public int getTotalPartitionsCount() {
+ int res = 0;
+
+ if (cctx.isLocal())
+ return res;
+
+ for (Map.Entry<Integer, GridDhtPartitionState> e : cctx.topology().localPartitionMap().entrySet()) {
+ if (e.getValue() == GridDhtPartitionState.OWNING || e.getValue() == GridDhtPartitionState.MOVING)
+ res++;
+ }
+
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ public int getRebalancingPartitionsCount() {
+ int res = 0;
+
+ if (cctx.isLocal())
+ return res;
+
+ for (Map.Entry<Integer, GridDhtPartitionState> e : cctx.topology().localPartitionMap().entrySet()) {
+ if (e.getValue() == GridDhtPartitionState.MOVING)
+ res++;
+ }
+
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ public long getKeysToRebalanceLeft() {
+ return Math.max(0, estimatedRebalancingKeys.get() - rebalancedKeys.get());
+ }
+
+ /** {@inheritDoc} */
+ public long getRebalancingKeysRate() {
+ return rebalancingKeysRate.getRate();
+ }
+
+ /** {@inheritDoc} */
+ public long getRebalancingBytesRate() {
+ return rebalancingBytesRate.getRate();
+ }
+
+ /**
+ * Clear rebalance counters.
+ */
+ public void clearRebalanceCounters() {
+ estimatedRebalancingKeys.set(0);
+
+ rebalancedKeys.set(0);
+
+ totalRebalancedBytes.set(0);
+
+ rebalancingBytesRate.clear();
+
+ rebalancingKeysRate.clear();
+ }
+
+ /**
+ * First rebalance supply message callback.
+ * @param keysCnt Estimated number of keys.
+ */
+ public void onRebalancingKeysCountEstimateReceived(long keysCnt) {
+ estimatedRebalancingKeys.addAndGet(keysCnt);
+ }
+
+ /**
+ * Rebalance entry store callback.
+ */
+ public void onRebalanceKeyReceived() {
+ rebalancedKeys.incrementAndGet();
+
+ rebalancingKeysRate.onHit();
+ }
+
+ /**
+ * Rebalance supply message callback.
+ *
+ * @param batchSize Batch size in bytes.
+ */
+ public void onRebalanceBatchReceived(long batchSize) {
+ totalRebalancedBytes.addAndGet(batchSize);
+
+ rebalancingBytesRate.onHits(batchSize);
+ }
+
++ /**
++ * @return Total number of allocated pages.
++ */
public long getTotalAllocatedPages() {
return 0;
}
++ /**
++ * @return Total number of evicted pages.
++ */
public long getTotalEvictedPages() {
return 0;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsSnapshot.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index e104b14,d6225c0..7574d84
--- 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
@@@ -1896,11 -1912,8 +1903,11 @@@ public class GridCacheProcessor extend
ClusterNode locNode = ctx.discovery().localNode();
- IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(cfg.getName()));
++ IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(cfg.getName());
+
boolean affNodeStart = !clientStartOnly && CU.affinityNode(locNode, nodeFilter);
boolean clientNodeStart = locNode.id().equals(initiatingNodeId);
- boolean proxyRestart = proxy != null && proxy.isRestarting() && !caches.containsKey(maskNull(cfg.getName()));
++ boolean proxyRestart = proxy != null && proxy.isRestarting() && !caches.containsKey(cfg.getName());
if (sharedCtx.cacheContext(CU.cacheId(cfg.getName())) != null)
return;
@@@ -1944,15 -1954,11 +1951,15 @@@
if (req.stop() || (req.close() && req.initiatingNodeId().equals(ctx.localNodeId()))) {
// Break the proxy before exchange future is done.
- IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(req.cacheName()));
+ IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(req.cacheName());
if (proxy != null) {
- if (req.stop())
+ if (req.stop()) {
+ if (req.restart())
+ proxy.restart();
+
proxy.gate().stopped();
+ }
else
proxy.closeProxy();
}
@@@ -1965,17 -1971,8 +1972,17 @@@
private void stopGateway(DynamicCacheChangeRequest req) {
assert req.stop() : req;
+ IgniteCacheProxy<?, ?> proxy;
+
// Break the proxy before exchange future is done.
- IgniteCacheProxy<?, ?> proxy = jCacheProxies.remove(req.cacheName());
+ if (req.restart()) {
- proxy = jCacheProxies.get(maskNull(req.cacheName()));
++ proxy = jCacheProxies.get(req.cacheName());
+
+ if (proxy != null)
+ proxy.restart();
+ }
+ else
- proxy = jCacheProxies.remove(maskNull(req.cacheName()));
++ proxy = jCacheProxies.remove(req.cacheName());
if (proxy != null)
proxy.gate().onStopped();
@@@ -1983,12 -1980,11 +1990,12 @@@
/**
* @param req Stop request.
+ * @return Stopped cache context.
*/
- private void prepareCacheStop(DynamicCacheChangeRequest req) {
+ private GridCacheContext<?, ?> prepareCacheStop(DynamicCacheChangeRequest req) {
assert req.stop() || req.close() : req;
- GridCacheAdapter<?, ?> cache = caches.remove(maskNull(req.cacheName()));
+ GridCacheAdapter<?, ?> cache = caches.remove(req.cacheName());
if (cache != null) {
GridCacheContext<?, ?> ctx = cache.context();
@@@ -2028,21 -2020,16 +2035,21 @@@
if (cacheCtx.preloader() != null)
cacheCtx.preloader().onInitialExchangeComplete(err);
- String masked = maskNull(cacheCtx.name());
+ String masked = cacheCtx.name();
- jCacheProxies.put(masked, new IgniteCacheProxy(cache.context(), cache, null, false));
+ jCacheProxies.putIfAbsent(masked, new IgniteCacheProxy(cache.context(), cache, null, false));
}
}
if (!F.isEmpty(reqs) && err == null) {
+ Collection<IgniteBiTuple<GridCacheContext, Boolean>> stopped = null;
+
for (DynamicCacheChangeRequest req : reqs) {
- String masked = maskNull(req.cacheName());
+ String masked = req.cacheName();
+ GridCacheContext<?, ?> stopCtx = null;
+ boolean destroy = false;
+
if (req.stop()) {
stopGateway(req);
@@@ -2708,7 -2676,9 +2718,9 @@@
* @param checkThreadTx If {@code true} checks that current thread does not have active transactions.
* @return Future that will be completed when cache is destroyed.
*/
- public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName, boolean checkThreadTx) {
+ public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName, boolean checkThreadTx, boolean restart) {
+ assert cacheName != null;
+
if (checkThreadTx)
checkEmptyTransactions();
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
index 2ed392a,5062d0f..8e53df6
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
@@@ -52,9 -54,9 +53,10 @@@ import org.apache.ignite.internal.proce
import org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl;
import org.apache.ignite.internal.processors.cache.database.tree.reuse.ReuseList;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
+import org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport;
+ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport;
+import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.mxbean.MemoryMetricsMXBean;
import org.jetbrains.annotations.Nullable;
@@@ -61,13 -65,12 +65,13 @@@ import static org.apache.ignite.configu
/**
*
*/
-public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdapter implements IgniteChangeGlobalStateSupport {
+public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdapter
+ implements IgniteChangeGlobalStateSupport, CheckpointLockStateChecker {
/** MemoryPolicyConfiguration name reserved for internal caches. */
- private static final String SYSTEM_MEMORY_POLICY_NAME = "sysMemPlc";
+ static final String SYSTEM_MEMORY_POLICY_NAME = "sysMemPlc";
/** Minimum size of memory chunk */
- private static final long MIN_PAGE_MEMORY_SIZE = 1024 * 1024;
+ private static final long MIN_PAGE_MEMORY_SIZE = 10 * 1024 * 1024;
/** */
protected Map<String, MemoryPolicy> memPlcMap;
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 99515c0,5425954..3ee6952
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@@ -140,9 -137,9 +141,9 @@@ public class GridDhtLocalPartition exte
* @param id Partition ID.
* @param entryFactory Entry factory.
*/
- @SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
- GridDhtLocalPartition(GridCacheContext cctx, int id, GridCacheMapEntryFactory entryFactory) {
+ @SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor") GridDhtLocalPartition(GridCacheContext cctx,
+ int id, GridCacheMapEntryFactory entryFactory) {
- super(cctx, entryFactory, cctx.config().getStartSize() / cctx.affinity().partitions());
+ super(cctx, entryFactory, Math.max(10, GridCacheAdapter.DFLT_START_CACHE_SIZE / cctx.affinity().partitions()));
this.id = id;
this.cctx = cctx;
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index b98d170,6ffa373..c52355f
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@@ -437,10 -400,10 +401,10 @@@ public class GridNearAtomicSingleUpdate
@Override protected void mapOnTopology() {
AffinityTopologyVersion topVer;
-
- if (cache.topology().stopping()) {
- onDone(new CacheStoppedException(
- cache.name()));
+ if (cache.topology().stopping()) {
- completeFuture(null,
- new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " + cache.name()),
++ completeFuture(null,new CacheStoppedException(
++ cache.name()),
+ null);
return;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 405e9e9,46a3c34..a521d6b
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@@ -644,8 -623,9 +624,7 @@@ public class GridNearAtomicUpdateFutur
AffinityTopologyVersion topVer;
if (cache.topology().stopping()) {
- onDone(new CacheStoppedException(
- cache.name()));
- completeFuture(null,
- new IgniteCheckedException("Failed to perform cache operation (cache is stopped): " + cache.name()),
- null);
++ completeFuture(null,new CacheStoppedException(cache.name()), null);
return;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 5ebcb35,75cbd00..350ae91
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@@ -766,52 -743,34 +765,41 @@@ public class GridDhtPartitionDemander
if (log.isDebugEnabled())
log.debug("Rebalancing key [key=" + entry.key() + ", part=" + p + ", node=" + pick.id() + ']');
- if (cctx.dht().isIgfsDataCache() &&
- cctx.dht().igfsDataSpaceUsed() > cctx.dht().igfsDataSpaceMax()) {
- LT.error(log, null, "Failed to rebalance IGFS data cache (IGFS space size exceeded maximum " +
- "value, will ignore rebalance entries)");
-
- if (cached.markObsoleteIfEmpty(null))
- cached.context().cache().removeEntry(cached);
-
- return true;
- }
- if (preloadPred == null || preloadPred.apply(entry)) {
- if (cached.initialValue(
- entry.value(),
- entry.version(),
- entry.ttl(),
- entry.expireTime(),
- true,
- topVer,
- cctx.isDrEnabled() ? DR_PRELOAD : DR_NONE,
- false
- )) {
- cctx.evicts().touch(cached, topVer); // Start tracking.
--
- if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED) && !cached.isInternal())
- cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(),
- (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, entry.value(), true, null,
- false, null, null, null, true);
- }
- else {
- cctx.evicts().touch(cached, topVer); // Start tracking.
+ cctx.shared().database().checkpointReadLock();
+
+ try {
+ if (preloadPred == null || preloadPred.apply(entry)) {
+ if (cached.initialValue(
+ entry.value(),
+ entry.version(),
+ entry.ttl(),
+ entry.expireTime(),
+ true,
+ topVer,
+ cctx.isDrEnabled() ? DR_PRELOAD : DR_NONE,
+ false
+ )) {
+ cctx.evicts().touch(cached, topVer); // Start tracking.
+
+ if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED) && !cached.isInternal())
+ cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(),
+ (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, entry.value(), true, null,
+ false, null, null, null, true);
+ }
+ else {
+ cctx.evicts().touch(cached, topVer); // Start tracking.
- if (log.isDebugEnabled())
- log.debug("Rebalancing entry is already in cache (will ignore) [key=" + cached.key() +
- ", part=" + p + ']');
+ if (log.isDebugEnabled())
+ log.debug("Rebalancing entry is already in cache (will ignore) [key=" + cached.key() +
+ ", part=" + p + ']');
+ }
}
+ else if (log.isDebugEnabled())
+ log.debug("Rebalance predicate evaluated to false for entry (will ignore): " + entry);
+ }
+ finally {
+ cctx.shared().database().checkpointReadUnlock();
}
- else if (log.isDebugEnabled())
- log.debug("Rebalance predicate evaluated to false for entry (will ignore): " + entry);
}
catch (GridCacheEntryRemovedException ignored) {
if (log.isDebugEnabled())
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxImplicitSingleStateImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxImplicitSingleStateImpl.java
index a0d45b9,36f5f2f..a7ccad9
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxImplicitSingleStateImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxImplicitSingleStateImpl.java
@@@ -26,7 -26,7 +26,8 @@@ import java.util.Set
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException;
+import org.apache.ignite.internal.processors.cache.CacheStoppedException;
+ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFuture;
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
index b9244f4,3679208..a71cf16
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxStateImpl.java
@@@ -28,7 -28,8 +28,9 @@@ import org.apache.ignite.IgniteCheckedE
import org.apache.ignite.cache.CacheInterceptor;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException;
+import org.apache.ignite.internal.processors.cache.CacheStoppedException;
+ import org.apache.ignite.internal.managers.discovery.DiscoCache;
+ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
@@@ -53,10 -54,10 +55,10 @@@ import static org.apache.ignite.cache.C
*/
public class IgniteTxStateImpl extends IgniteTxLocalStateAdapter {
/** Active cache IDs. */
- private GridLongList activeCacheIds = new GridLongList();
+ private GridIntList activeCacheIds = new GridIntList();
/** Per-transaction read map. */
- @GridToStringInclude
+ @GridToStringExclude
protected Map<IgniteTxKey, IgniteTxEntry> txMap;
/** Read view on transaction map. */
@@@ -474,7 -476,23 +476,23 @@@
}
/** {@inheritDoc} */
+ @Override public boolean hasNearCacheConfigured(GridCacheSharedContext ctx, AffinityTopologyVersion topVer) {
+ DiscoCache discoCache = ctx.discovery().discoCache(topVer);
+
+ assert discoCache != null : topVer;
+
+ for (int i = 0; i < activeCacheIds.size(); i++) {
+ int cacheId = activeCacheIds.get(i);
+
+ if (discoCache.hasNearCache(cacheId))
+ return true;
+ }
+
+ return false;
+ }
+
+ /** {@inheritDoc} */
public String toString() {
- return S.toString(IgniteTxStateImpl.class, this);
+ return S.toString(IgniteTxStateImpl.class, this, "txMap", allEntriesCopy());
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
index 3f37855,0afba59..8758afd
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
@@@ -239,35 -238,19 +238,16 @@@ public interface GridQueryIndexing
* Rebuilds all indexes of given type from hash index.
*
* @param spaceName Space name.
- * @param type Type descriptor.
* @throws IgniteCheckedException If failed.
*/
- public void rebuildIndexesFromHash(@Nullable String spaceName) throws IgniteCheckedException;
- public void rebuildIndexesFromHash(String spaceName,
- GridQueryTypeDescriptor type) throws IgniteCheckedException;
++ public void rebuildIndexesFromHash(String spaceName) throws IgniteCheckedException;
/**
* Marks all indexes of given type for rebuild from hash index, making them unusable until rebuild finishes.
*
* @param spaceName Space name.
- * @param type Type descriptor.
*/
- public void markForRebuildFromHash(@Nullable String spaceName);
- public void markForRebuildFromHash(String spaceName, GridQueryTypeDescriptor type);
++ public void markForRebuildFromHash(String spaceName);
/**
* Returns backup filter.
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 87b559a,448639b..c44fc52
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@@ -656,93 -659,110 +658,112 @@@ public class GridQueryProcessor extend
* @throws IgniteCheckedException If failed.
*/
@SuppressWarnings({"deprecation", "ThrowableResultOfMethodCallIgnored"})
- private void initializeCache(GridCacheContext<?, ?> cctx, QuerySchema schema) throws IgniteCheckedException {
- String space = cctx.name();
+ public void onCacheStart0(GridCacheContext<?, ?> cctx, QuerySchema schema)
+ throws IgniteCheckedException {
- // Prepare candidates.
- List<Class<?>> mustDeserializeClss = new ArrayList<>();
+ cctx.shared().database().checkpointReadLock();
- Collection<QueryTypeCandidate> cands = new ArrayList<>();
+ try {
+ synchronized (stateMux) {
+ String space = cctx.name();
- Collection<QueryEntity> qryEntities = schema.entities();
+ // Prepare candidates.
+ List<Class<?>> mustDeserializeClss = new ArrayList<>();
- if (!F.isEmpty(qryEntities)) {
- for (QueryEntity qryEntity : qryEntities) {
- QueryTypeCandidate cand = QueryUtils.typeForQueryEntity(space, cctx, qryEntity, mustDeserializeClss);
+ Collection<QueryTypeCandidate> cands = new ArrayList<>();
- cands.add(cand);
- }
- }
+ Collection<QueryEntity> qryEntities = schema.entities();
- // Ensure that candidates has unique index names. Otherwise we will not be able to apply pending operations.
- Map<String, QueryTypeDescriptorImpl> tblTypMap = new HashMap<>();
- Map<String, QueryTypeDescriptorImpl> idxTypMap = new HashMap<>();
+ if (!F.isEmpty(qryEntities)) {
+ for (QueryEntity qryEntity : qryEntities) {
+ QueryTypeCandidate cand = QueryUtils.typeForQueryEntity(space, cctx, qryEntity,
+ mustDeserializeClss);
- for (QueryTypeCandidate cand : cands) {
- QueryTypeDescriptorImpl desc = cand.descriptor();
+ cands.add(cand);
+ }
+ }
- QueryTypeDescriptorImpl oldDesc = tblTypMap.put(desc.tableName(), desc);
+ // Ensure that candidates has unique index names. Otherwise we will not be able to apply pending operations.
+ Map<String, QueryTypeDescriptorImpl> tblTypMap = new HashMap<>();
+ Map<String, QueryTypeDescriptorImpl> idxTypMap = new HashMap<>();
- if (oldDesc != null)
- throw new IgniteException("Duplicate table name [cache=" + space +
- ", tblName=" + desc.tableName() + ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
+ for (QueryTypeCandidate cand : cands) {
+ QueryTypeDescriptorImpl desc = cand.descriptor();
- for (String idxName : desc.indexes().keySet()) {
- oldDesc = idxTypMap.put(idxName, desc);
+ QueryTypeDescriptorImpl oldDesc = tblTypMap.put(desc.tableName(), desc);
- if (oldDesc != null)
- throw new IgniteException("Duplicate index name [cache=" + space +
- ", idxName=" + idxName + ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
- }
- }
+ if (oldDesc != null)
+ throw new IgniteException("Duplicate table name [cache=" + space +
- ", tblName=" + desc.tableName() + ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
++ ",tblName=" + desc.tableName() +
++ ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
- // Apply pending operation which could have been completed as no-op at this point. There could be only one
- // in-flight operation for a cache.
- synchronized (stateMux) {
- if (disconnected)
- return;
+ for (String idxName : desc.indexes().keySet()) {
+ oldDesc = idxTypMap.put(idxName, desc);
- for (SchemaOperation op : schemaOps.values()) {
- if (F.eq(op.proposeMessage().deploymentId(), cctx.dynamicDeploymentId())) {
- if (op.started()) {
- SchemaOperationWorker worker = op.manager().worker();
+ if (oldDesc != null)
+ throw new IgniteException("Duplicate index name [cache=" + space +
- ", idxName=" + idxName + ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
++ ",idxName=" + idxName +
++ ", type1=" + desc.name() + ", type2=" + oldDesc.name() + ']');
+ }
+ }
- assert !worker.cacheRegistered();
+ // Apply pending operation which could have been completed as no-op at this point.
+ // There could be only one in-flight operation for a cache.
+ for (SchemaOperation op : schemaOps.values()) {
+ if (F.eq(op.proposeMessage().deploymentId(), cctx.dynamicDeploymentId())) {
+ if (op.started()) {
+ SchemaOperationWorker worker = op.manager().worker();
- if (!worker.nop()) {
- IgniteInternalFuture fut = worker.future();
+ assert !worker.cacheRegistered();
- assert fut.isDone();
+ if (!worker.nop()) {
+ IgniteInternalFuture fut = worker.future();
- if (fut.error() == null) {
- SchemaAbstractOperation op0 = op.proposeMessage().operation();
+ assert fut.isDone();
- if (op0 instanceof SchemaIndexCreateOperation) {
- SchemaIndexCreateOperation opCreate = (SchemaIndexCreateOperation)op0;
+ if (fut.error() == null) {
+ SchemaAbstractOperation op0 = op.proposeMessage().operation();
- QueryTypeDescriptorImpl typeDesc = tblTypMap.get(opCreate.tableName());
+ if (op0 instanceof SchemaIndexCreateOperation) {
+ SchemaIndexCreateOperation opCreate = (SchemaIndexCreateOperation) op0;
- assert typeDesc != null;
+ QueryTypeDescriptorImpl typeDesc = tblTypMap.get(opCreate.tableName());
- QueryUtils.processDynamicIndexChange(opCreate.indexName(), opCreate.index(),
- typeDesc);
- }
- else if (op0 instanceof SchemaIndexDropOperation) {
- SchemaIndexDropOperation opDrop = (SchemaIndexDropOperation)op0;
+ assert typeDesc != null;
- QueryTypeDescriptorImpl typeDesc = idxTypMap.get(opDrop.indexName());
+ QueryUtils.processDynamicIndexChange(opCreate.indexName(), opCreate.index(),
+ typeDesc);
+ }
+ else if (op0 instanceof SchemaIndexDropOperation) {
+ SchemaIndexDropOperation opDrop = (SchemaIndexDropOperation) op0;
- assert typeDesc != null;
+ QueryTypeDescriptorImpl typeDesc = idxTypMap.get(opDrop.indexName());
- QueryUtils.processDynamicIndexChange(opDrop.indexName(), null, typeDesc);
+ assert typeDesc != null;
+
+ QueryUtils.processDynamicIndexChange(opDrop.indexName(), null, typeDesc);
+ }
+ else
+ assert false;
}
- else
- assert false;
}
}
+
+ break;
}
+ }
- break;
+ // Ready to register at this point.
+ registerCache0(space, cctx, cands);
+
+ // Warn about possible implicit deserialization.
+ if (!mustDeserializeClss.isEmpty()) {
+ U.warn(log, "Some classes in query configuration cannot be written in binary format " +
+ "because they either implement Externalizable interface or have writeObject/readObject " +
+ "methods. Instances of these classes will be deserialized in order to build indexes. Please " +
+ "ensure that all nodes have these classes in classpath. To enable binary serialization " +
+ "either implement " + Binarylizable.class.getSimpleName() + " interface or set explicit " +
+ "serializer using BinaryTypeConfiguration.setSerializer() method: " + mustDeserializeClss);
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
index e56f39f,1a80a37..0141e8b
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
@@@ -45,8 -45,10 +45,11 @@@ import java.lang.reflect.Method
import java.math.BigDecimal;
import java.sql.Time;
import java.sql.Timestamp;
+import java.util.Collection;
+ import java.util.ArrayList;
+ import java.util.Collection;
import java.util.HashSet;
+ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index ccf3a1d,6f8728c..72272e7
mode 100755,100644..100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --cc modules/core/src/main/resources/META-INF/classnames.properties
index 90b83a4,ca5f756..c36e32f
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@@ -1718,11 -1729,12 +1738,13 @@@ org.apache.ignite.internal.visor.cache.
org.apache.ignite.internal.visor.cache.VisorCacheRebalanceConfiguration
org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTask
org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTask$VisorCachesRebalanceJob
+ org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTaskArg
org.apache.ignite.internal.visor.cache.VisorCacheResetMetricsTask
org.apache.ignite.internal.visor.cache.VisorCacheResetMetricsTask$VisorCacheResetMetricsJob
+ org.apache.ignite.internal.visor.cache.VisorCacheResetMetricsTaskArg
org.apache.ignite.internal.visor.cache.VisorCacheSqlIndexMetadata
org.apache.ignite.internal.visor.cache.VisorCacheSqlMetadata
+org.apache.ignite.internal.visor.cache.VisorCacheStartArg
org.apache.ignite.internal.visor.cache.VisorCacheStartTask
org.apache.ignite.internal.visor.cache.VisorCacheStartTask$VisorCacheStartJob
org.apache.ignite.internal.visor.cache.VisorCacheStartTaskArg
@@@ -1835,11 -1861,12 +1874,13 @@@ org.apache.ignite.internal.visor.node.V
org.apache.ignite.internal.visor.node.VisorSpisConfiguration
org.apache.ignite.internal.visor.node.VisorSuppressedError
org.apache.ignite.internal.visor.node.VisorTransactionConfiguration
+org.apache.ignite.internal.visor.query.VisorQueryArg
org.apache.ignite.internal.visor.query.VisorQueryCancelTask
org.apache.ignite.internal.visor.query.VisorQueryCancelTask$VisorCancelQueriesJob
+ org.apache.ignite.internal.visor.query.VisorQueryCancelTaskArg
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask
org.apache.ignite.internal.visor.query.VisorQueryCleanupTask$VisorQueryCleanupJob
+ org.apache.ignite.internal.visor.query.VisorQueryCleanupTaskArg
org.apache.ignite.internal.visor.query.VisorQueryConfiguration
org.apache.ignite.internal.visor.query.VisorQueryDetailMetrics
org.apache.ignite.internal.visor.query.VisorQueryDetailMetricsCollectorTask
@@@ -1863,8 -1892,8 +1906,9 @@@ org.apache.ignite.internal.visor.query.
org.apache.ignite.internal.visor.query.VisorQueryTaskArg
org.apache.ignite.internal.visor.query.VisorRunningQueriesCollectorTask
org.apache.ignite.internal.visor.query.VisorRunningQueriesCollectorTask$VisorCollectRunningQueriesJob
+ org.apache.ignite.internal.visor.query.VisorRunningQueriesCollectorTaskArg
org.apache.ignite.internal.visor.query.VisorRunningQuery
+org.apache.ignite.internal.visor.query.VisorScanQueryArg
org.apache.ignite.internal.visor.query.VisorScanQueryTask
org.apache.ignite.internal.visor.query.VisorScanQueryTask$VisorScanQueryJob
org.apache.ignite.internal.visor.query.VisorScanQueryTaskArg
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java
index dbe2bec,99f934d..0a6e9f8
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbMemoryLeakAbstractTest.java
@@@ -78,11 -74,6 +78,11 @@@ public abstract class IgniteDbMemoryLea
/** {@inheritDoc} */
@Override protected void configure(MemoryConfiguration mCfg) {
mCfg.setConcurrencyLevel(CONCURRENCY_LEVEL);
+
+ long size = (1024 * (isLargePage() ? 16 : 1) + 24) * pagesMax();
+
+ mCfg.setDefaultMemoryPolicyName("default").setMemoryPolicies(
- new MemoryPolicyConfiguration().setSize(Math.max(size, MIN_PAGE_CACHE_SIZE)).setName("default"));
++ new MemoryPolicyConfiguration().setMaxSize(Math.max(size, MIN_PAGE_CACHE_SIZE)).setName("default"));
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
index 16349ab,c916c10..f085ebb
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
@@@ -138,8 -113,10 +138,8 @@@ public abstract class IgniteDbPutGetAbs
/**
*
*/
- public void testRandomRemove() {
- IgniteEx ig = grid(0);
-
- IgniteCache<Integer, DbValue> cache = ig.cache(DEFAULT_CACHE_NAME);
+ public void testRandomRemove() throws Exception {
- IgniteCache<Integer, DbValue> cache = cache(null);
++ IgniteCache<Integer, DbValue> cache = cache(DEFAULT_CACHE_NAME);
final int cnt = 50_000;
@@@ -175,10 -152,13 +175,10 @@@
}
}
-
/**
*/
- public void testRandomPut() {
- IgniteEx ig = grid(0);
-
- IgniteCache<Integer, DbValue> cache = ig.cache(DEFAULT_CACHE_NAME);
+ public void testRandomPut() throws Exception {
- IgniteCache<Integer, DbValue> cache = cache(null);
++ IgniteCache<Integer, DbValue> cache = cache(DEFAULT_CACHE_NAME);
final int cnt = 1_000;
@@@ -230,7 -213,9 +230,7 @@@
* @throws Exception if failed.
*/
public void testPutGetLarge() throws Exception {
- IgniteCache<Integer, byte[]> cache = cache(null);
- IgniteEx ig = grid(0);
-
- IgniteCache<Integer, byte[]> cache = ig.cache(DEFAULT_CACHE_NAME);
++ IgniteCache<Integer, byte[]> cache = cache(DEFAULT_CACHE_NAME);
final byte[] val = new byte[2048];
@@@ -490,9 -484,9 +492,9 @@@
* @throws Exception if failed.
*/
public void testBounds() throws Exception {
- IgniteEx ig = grid(0);
+ IgniteEx ig = ig();
- final IgniteCache<Integer, DbValue> cache = cache(null);
- final IgniteCache<Integer, DbValue> cache = ig.cache(DEFAULT_CACHE_NAME);
++ final IgniteCache<Integer, DbValue> cache = cache(DEFAULT_CACHE_NAME);
X.println("Put start");
@@@ -548,9 -542,9 +550,9 @@@
* @throws Exception if failed.
*/
public void testMultithreadedPut() throws Exception {
- IgniteEx ig = grid(0);
+ IgniteEx ig = ig();
- final IgniteCache<Integer, DbValue> cache = ig.cache(null);
+ final IgniteCache<Integer, DbValue> cache = ig.cache(DEFAULT_CACHE_NAME);
X.println("Put start");
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheWriteMetricsTask.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index ae564f0,cf68c3c..4bd2372
mode 100755,100644..100755
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index f81700e,f7466a8..e31ca45
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@@ -164,7 -164,9 +165,8 @@@ import org.h2.command.ddl.CreateTableDa
import org.h2.command.dml.Insert;
import org.h2.engine.Session;
import org.h2.engine.SysProperties;
-import org.h2.index.Cursor;
import org.h2.index.Index;
+ import org.h2.index.SpatialIndex;
import org.h2.jdbc.JdbcConnection;
import org.h2.jdbc.JdbcPreparedStatement;
import org.h2.jdbc.JdbcStatement;
@@@ -1788,7 -1737,8 +1737,8 @@@ public class IgniteH2Indexing implement
cancel = new GridQueryCancel();
QueryCursorImpl<List<?>> cursor = new QueryCursorImpl<>(
- runQueryTwoStep(cctx, twoStepQry, cctx.keepBinary(), enforceJoinOrder, qry.getTimeout(), cancel, qry.getArgs()),
- runQueryTwoStep(cctx, twoStepQry, cctx.keepBinary(), enforceJoinOrder, qry.getTimeout(), cancel,
++ runQueryTwoStep(cctx, twoStepQry, cctx.keepBinary(), enforceJoinOrder, qry.getTimeout(), cancel,
+ qry.getArgs(), qry.getPartitions()),
cancel);
cursor.fieldsMeta(meta);
@@@ -2157,10 -2124,25 +2124,10 @@@
* Rebuild indexes from hash index.
*
* @param spaceName Space name.
- * @param type Type descriptor.
* @throws IgniteCheckedException If failed.
*/
- @Override public void rebuildIndexesFromHash(@Nullable String spaceName) throws IgniteCheckedException {
- @Override public void rebuildIndexesFromHash(String spaceName,
- GridQueryTypeDescriptor type) throws IgniteCheckedException {
- TableDescriptor tbl = tableDescriptor(type.name(), spaceName);
-
- if (tbl == null)
- return;
-
- assert tbl.tbl != null;
-
- assert tbl.tbl.rebuildFromHashInProgress();
-
- H2PkHashIndex hashIdx = tbl.pkHashIdx;
-
- Cursor cursor = hashIdx.find((Session)null, null, null);
-
- int cacheId = CU.cacheId(tbl.schema.ccfg.getName());
++ @Override public void rebuildIndexesFromHash(String spaceName) throws IgniteCheckedException {
+ int cacheId = CU.cacheId(spaceName);
GridCacheContext cctx = ctx.cache().context().cacheContext(cacheId);
@@@ -2203,12 -2186,15 +2170,12 @@@
}
/** {@inheritDoc} */
- @Override public void markForRebuildFromHash(@Nullable String spaceName) {
- @Override public void markForRebuildFromHash(String spaceName, GridQueryTypeDescriptor type) {
- TableDescriptor tbl = tableDescriptor(type.name(), spaceName);
++ @Override public void markForRebuildFromHash(String spaceName) {
+ for (TableDescriptor tblDesc : tables(spaceName)) {
+ assert tblDesc.tbl != null;
- if (tbl == null)
- return;
-
- assert tbl.tbl != null;
-
- tbl.tbl.markRebuildFromHashInProgress(true);
+ tblDesc.tbl.markRebuildFromHashInProgress(true);
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38e9baa8/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
----------------------------------------------------------------------