/** * @return Offheap manager. */ public IgniteCacheOffheapManager offheap() { return grp.offheap(); }
@Override public Long apply() { long freeSpace = 0L; for (CacheGroupContext grpCtx : cctx.cache().cacheGroups()) { if (!grpCtx.dataRegion().config().getName().equals(dataRegName)) continue; assert grpCtx.offheap() instanceof GridCacheOffheapManager; freeSpace += ((GridCacheOffheapManager)grpCtx.offheap()).freeSpace(); } return freeSpace; } };
/** * Release created data store for this partition. */ private void destroyCacheDataStore() { try { grp.offheap().destroyCacheDataStore(dataStore()); } catch (IgniteCheckedException e) { log.error("Unable to destroy cache data store on partition eviction [id=" + id + "]", e); } }
/** * @param forGroups Cache groups. * @param partitionStates Partition states. * @throws IgniteCheckedException If failed. */ private void restorePartitionStates( Collection<CacheGroupContext> forGroups, Map<GroupPartitionId, PartitionRecoverState> partitionStates ) throws IgniteCheckedException { long startRestorePart = U.currentTimeMillis(); if (log.isInfoEnabled()) log.info("Restoring partition state for local groups."); long totalProcessed = 0; for (CacheGroupContext grp : forGroups) totalProcessed += grp.offheap().restorePartitionStates(partitionStates); if (log.isInfoEnabled()) log.info("Finished restoring partition state for local groups [" + "groupsProcessed=" + forGroups.size() + ", partitionsProcessed=" + totalProcessed + ", time=" + (U.currentTimeMillis() - startRestorePart) + "ms]"); } }
mngr.removeCheckpointListener((DbCheckpointListener)gctx.offheap());
GridIterator<CacheDataRow> it = grpCtx.offheap().partitionIterator(part.id());
((GridCacheOffheapManager)grp.offheap()).dataStore(partition);
GridIterator<CacheDataRow> it = grpCtx.offheap().partitionIterator(part.id());
checkPartitionCrc(grpCtx, part, cpFlag); GridIterator<CacheDataRow> it = grpCtx.offheap().partitionIterator(part.id());
/** * Removes some entries from H2 trees skipping partition updates. This effectively breaks the index. */ private void breakSqlIndex(Ignite ig, String cacheName) throws Exception { GridQueryProcessor qry = ((IgniteEx)ig).context().query(); GridCacheContext<Object, Object> ctx = ((IgniteEx)ig).cachex(cacheName).context(); GridDhtLocalPartition locPart = ctx.topology().localPartitions().get(0); GridIterator<CacheDataRow> it = ctx.group().offheap().partitionIterator(locPart.id()); for (int i = 0; i < 500; i++) { if (!it.hasNextX()) { System.out.println("Early exit for index corruption, keys processed: " + i); break; } CacheDataRow row = it.nextX(); ctx.shared().database().checkpointReadLock(); try { qry.remove(ctx, row); } finally { ctx.shared().database().checkpointReadUnlock(); } } }
pageMem, grp.dataRegion().config().isPersistenceEnabled() ? grp.shared().wal() : null, grp.offheap().globalRemoveId(), metaPageId, reuseList,
GridIterator<CacheDataRow> it = grpCtx.offheap().partitionIterator(part.id());
CacheDataRow cacheDataStoreRow = ctx.group().offheap().read(ctx, h2key);
grp.dataRegion().pageMemory(), grp.dataRegion().config().isPersistenceEnabled() ? grp.shared().wal() : null, grp.offheap().globalRemoveId(), metaPageId, reuseList,
cacheGroup.offheap().restorePartitionStates(Collections.emptyMap());
GridIterator<CacheDataRow> it0 = grp.offheap().partitionIterator(id);
/** * @return Offheap manager. */ public IgniteCacheOffheapManager offheap() { return grp.offheap(); }