Search in sources :

Example 11 with PageStore

use of org.apache.ignite.internal.pagemem.store.PageStore in project ignite by apache.

the class CachePartitionDefragmentationManager method defragmentOnePartition.

/**
 * Defragment one given partition.
 */
private boolean defragmentOnePartition(CacheGroupContext oldGrpCtx, int grpId, File workDir, GridCacheOffheapManager offheap, FileVersionCheckingFactory pageStoreFactory, GridCompoundFuture<Object, Object> cmpFut, PageMemoryEx oldPageMem, CacheGroupContext newGrpCtx, CacheDataStore oldCacheDataStore) throws IgniteCheckedException {
    TreeIterator treeIter = new TreeIterator(pageSize);
    checkCancellation();
    int partId = oldCacheDataStore.partId();
    PartitionContext partCtx = new PartitionContext(workDir, grpId, partId, partDataRegion, mappingDataRegion, oldGrpCtx, newGrpCtx, oldCacheDataStore, pageStoreFactory);
    if (skipAlreadyDefragmentedPartition(workDir, grpId, partId, log)) {
        partCtx.createPageStore(() -> defragmentedPartMappingFile(workDir, partId).toPath(), partCtx.mappingPagesAllocated, partCtx.mappingPageMemory);
        linkMapByPart.put(partId, partCtx.createLinkMapTree(false));
        return false;
    }
    partCtx.createPageStore(() -> defragmentedPartMappingFile(workDir, partId).toPath(), partCtx.mappingPagesAllocated, partCtx.mappingPageMemory);
    linkMapByPart.put(partId, partCtx.createLinkMapTree(true));
    checkCancellation();
    partCtx.createPageStore(() -> defragmentedPartTmpFile(workDir, partId).toPath(), partCtx.partPagesAllocated, partCtx.partPageMemory);
    partCtx.createNewCacheDataStore(offheap);
    copyPartitionData(partCtx, treeIter);
    DefragmentationPageReadWriteManager pageMgr = (DefragmentationPageReadWriteManager) partCtx.partPageMemory.pageManager();
    PageStore oldPageStore = filePageStoreMgr.getStore(grpId, partId);
    status.onPartitionDefragmented(oldGrpCtx, oldPageStore.size(), // + file header.
    pageSize + partCtx.partPagesAllocated.get() * pageSize);
    // TODO Move inside of defragmentSinglePartition.
    IgniteInClosure<IgniteInternalFuture<?>> cpLsnr = fut -> {
        if (fut.error() == null) {
            if (log.isDebugEnabled()) {
                log.debug(S.toString("Partition defragmented", "grpId", grpId, false, "partId", partId, false, "oldPages", oldPageStore.pages(), false, "newPages", partCtx.partPagesAllocated.get() + 1, false, "mappingPages", partCtx.mappingPagesAllocated.get() + 1, false, "pageSize", pageSize, false, "partFile", defragmentedPartFile(workDir, partId).getName(), false, "workDir", workDir, false));
            }
            oldPageMem.invalidate(grpId, partId);
            partCtx.partPageMemory.invalidate(grpId, partId);
            // Yes, it'll be invalid in a second.
            pageMgr.pageStoreMap().removePageStore(grpId, partId);
            renameTempPartitionFile(workDir, partId);
        }
    };
    GridFutureAdapter<?> cpFut = defragmentationCheckpoint.forceCheckpoint("partition defragmented", null).futureFor(FINISHED);
    cpFut.listen(cpLsnr);
    cmpFut.add((IgniteInternalFuture<Object>) cpFut);
    return true;
}
Also used : IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) Arrays(java.util.Arrays) PageStore(org.apache.ignite.internal.pagemem.store.PageStore) CacheType(org.apache.ignite.internal.processors.cache.CacheType) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) FLAG_DATA(org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_DATA) IntMap(org.apache.ignite.internal.util.collection.IntMap) DEFRAGMENTATION_MAPPING_REGION_NAME(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.DEFRAGMENTATION_MAPPING_REGION_NAME) DEFRAGMENTATION_PART_REGION_NAME(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.DEFRAGMENTATION_PART_REGION_NAME) DefragmentationFileUtils.defragmentedPartMappingFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.defragmentedPartMappingFile) CacheDataStore(org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManager.CacheDataStore) CheckpointTimeoutLock(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock) DefragmentationFileUtils.defragmentedPartFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.defragmentedPartFile) LightweightCheckpointManager(org.apache.ignite.internal.processors.cache.persistence.checkpoint.LightweightCheckpointManager) PagePartitionMetaIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PagePartitionMetaIO) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MaintenanceRegistry(org.apache.ignite.maintenance.MaintenanceRegistry) Map(java.util.Map) Path(java.nio.file.Path) AbstractFreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList) IndexProcessor(org.apache.ignite.internal.cache.query.index.IndexProcessor) DataRow(org.apache.ignite.internal.processors.cache.tree.DataRow) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) IgniteOutClosure(org.apache.ignite.lang.IgniteOutClosure) DefragmentationFileUtils.skipAlreadyDefragmentedPartition(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.skipAlreadyDefragmentedPartition) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) Set(java.util.Set) PendingRow(org.apache.ignite.internal.processors.cache.tree.PendingRow) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) LinkedBlockingQueue(java.util.concurrent.LinkedBlockingQueue) Collectors(java.util.stream.Collectors) IgniteCacheOffheapManager(org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManager) INDEX_PARTITION(org.apache.ignite.internal.pagemem.PageIdAllocator.INDEX_PARTITION) IntRWHashMap(org.apache.ignite.internal.util.collection.IntRWHashMap) List(java.util.List) GridCacheDataStore(org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager.GridCacheDataStore) StreamSupport.stream(java.util.stream.StreamSupport.stream) PageIdUtils(org.apache.ignite.internal.pagemem.PageIdUtils) CU(org.apache.ignite.internal.util.typedef.internal.CU) PagePartitionMetaIOV3(org.apache.ignite.internal.processors.cache.persistence.tree.io.PagePartitionMetaIOV3) IntHashMap(org.apache.ignite.internal.util.collection.IntHashMap) FLAG_IDX(org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_IDX) GridAtomicLong(org.apache.ignite.internal.util.GridAtomicLong) SimpleDataRow(org.apache.ignite.internal.processors.cache.persistence.freelist.SimpleDataRow) DefragmentationFileUtils.defragmentedIndexTmpFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.defragmentedIndexTmpFile) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) GridCompoundFuture(org.apache.ignite.internal.util.future.GridCompoundFuture) U(org.apache.ignite.internal.util.typedef.internal.U) HashMap(java.util.HashMap) IgniteLogger(org.apache.ignite.IgniteLogger) CacheGroupContext(org.apache.ignite.internal.processors.cache.CacheGroupContext) TreeSet(java.util.TreeSet) HashSet(java.util.HashSet) DefragmentationFileUtils.renameTempIndexFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.renameTempIndexFile) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) GridCacheOffheapManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager) CheckpointManager(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointManager) DefragmentationFileUtils.writeDefragmentationCompletionMarker(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.writeDefragmentationCompletionMarker) DefragmentationFileUtils.skipAlreadyDefragmentedCacheGroup(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.skipAlreadyDefragmentedCacheGroup) IgniteUtils(org.apache.ignite.internal.util.IgniteUtils) S(org.apache.ignite.internal.util.typedef.internal.S) DefragmentationFileUtils.renameTempPartitionFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.renameTempPartitionFile) PageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO) IgniteThreadPoolExecutor(org.apache.ignite.thread.IgniteThreadPoolExecutor) Comparator.comparing(java.util.Comparator.comparing) CacheDataTree(org.apache.ignite.internal.processors.cache.tree.CacheDataTree) AbstractDataLeafIO(org.apache.ignite.internal.processors.cache.tree.AbstractDataLeafIO) FINISHED(org.apache.ignite.internal.processors.cache.persistence.CheckpointState.FINISHED) PendingEntriesTree(org.apache.ignite.internal.processors.cache.tree.PendingEntriesTree) DefragmentationFileUtils.defragmentedPartTmpFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.defragmentedPartTmpFile) DefragmentationFileUtils.defragmentedIndexFile(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.defragmentedIndexFile) IoStatisticsHolderNoOp(org.apache.ignite.internal.metric.IoStatisticsHolderNoOp) DataPageEvictionMode(org.apache.ignite.configuration.DataPageEvictionMode) DefragmentationFileUtils.batchRenameDefragmentedCacheGroupPartitions(org.apache.ignite.internal.processors.cache.persistence.defragmentation.DefragmentationFileUtils.batchRenameDefragmentedCacheGroupPartitions) FileVersionCheckingFactory(org.apache.ignite.internal.processors.cache.persistence.file.FileVersionCheckingFactory) File(java.io.File) LongConsumer(java.util.function.LongConsumer) AtomicLong(java.util.concurrent.atomic.AtomicLong) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) TreeMap(java.util.TreeMap) PageMemoryEx(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx) GridQueryProcessor(org.apache.ignite.internal.processors.query.GridQueryProcessor) PageStore(org.apache.ignite.internal.pagemem.store.PageStore) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture)

Example 12 with PageStore

use of org.apache.ignite.internal.pagemem.store.PageStore in project ignite by apache.

the class PageStoreMap method getStore.

/**
 * {@inheritDoc}
 */
@Override
public PageStore getStore(int grpId, int partId) throws IgniteCheckedException {
    IntMap<PageStore> partPageStoresMap = grpPageStoresMap.get(grpId);
    if (partPageStoresMap == null) {
        throw new IgniteCheckedException(S.toString("Page store map not found. ", "grpId", grpId, false, "partId", partId, false, "keys", Arrays.toString(grpPageStoresMap.keys()), false, "this", hashCode(), false));
    }
    PageStore pageStore = partPageStoresMap.get(partId);
    if (pageStore == null) {
        throw new IgniteCheckedException(S.toString("Page store not found. ", "grpId", grpId, false, "partId", partId, false, "keys", Arrays.toString(partPageStoresMap.keys()), false, "this", hashCode(), false));
    }
    return pageStore;
}
Also used : IgniteCheckedException(org.apache.ignite.IgniteCheckedException) PageStore(org.apache.ignite.internal.pagemem.store.PageStore)

Example 13 with PageStore

use of org.apache.ignite.internal.pagemem.store.PageStore in project ignite by apache.

the class SnapshotFutureTask method addPartitionWriters.

/**
 * @param grpId Cache group id.
 * @param parts Set of partitions to be processed.
 * @param dirName Directory name to init.
 * @throws IgniteCheckedException If fails.
 */
private void addPartitionWriters(int grpId, Set<Integer> parts, String dirName) throws IgniteCheckedException {
    Integer encGrpId = cctx.cache().isEncrypted(grpId) ? grpId : null;
    for (int partId : parts) {
        GroupPartitionId pair = new GroupPartitionId(grpId, partId);
        PageStore store = pageStore.getStore(grpId, partId);
        partDeltaWriters.put(pair, new PageStoreSerialWriter(store, partDeltaFile(cacheWorkDir(tmpConsIdDir, dirName), partId), encGrpId));
        partFileLengths.put(pair, store.size());
    }
}
Also used : PageStore(org.apache.ignite.internal.pagemem.store.PageStore) GroupPartitionId(org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId)

Example 14 with PageStore

use of org.apache.ignite.internal.pagemem.store.PageStore in project ignite by apache.

the class CheckpointBufferDeadlockTest method runDeadlockScenario.

/**
 */
private void runDeadlockScenario() throws Exception {
    LogListener lsnr = LogListener.matches(s -> s.contains("AssertionError")).build();
    log.registerListener(lsnr);
    IgniteEx ig = startGrid(0);
    ig.cluster().active(true);
    GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager) ig.context().cache().context().database();
    FilePageStoreManager pageStoreMgr = (FilePageStoreManager) ig.context().cache().context().pageStore();
    final String cacheName = "single-part";
    CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>().setName(cacheName).setAffinity(new RendezvousAffinityFunction(false, 1));
    IgniteCache<Object, Object> singlePartCache = ig.getOrCreateCache(cacheCfg);
    db.enableCheckpoints(false).get();
    Thread.sleep(1_000);
    try (IgniteDataStreamer<Object, Object> streamer = ig.dataStreamer(singlePartCache.getName())) {
        int entries = MAX_SIZE / ENTRY_BYTE_CHUNK_SIZE / 4;
        for (int i = 0; i < entries; i++) streamer.addData(i, new byte[ENTRY_BYTE_CHUNK_SIZE]);
        streamer.flush();
    }
    slowCheckpointEnabled.set(true);
    log.info(">>> Slow checkpoints enabled");
    db.enableCheckpoints(true).get();
    AtomicBoolean fail = new AtomicBoolean(false);
    IgniteInternalFuture<Long> fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {

        @Override
        public void run() {
            int loops = 0;
            while (!stop.get()) {
                if (loops % 10 == 0 && loops > 0 && loops < 500 || loops % 500 == 0 && loops >= 500)
                    log.info("Successfully completed " + loops + " loops");
                db.checkpointReadLock();
                try {
                    Set<FullPageId> pickedPagesSet = new HashSet<>();
                    PageStore store = pageStoreMgr.getStore(CU.cacheId(cacheName), 0);
                    int pages = store.pages();
                    DataRegion region = db.dataRegion(DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME);
                    PageMemoryImpl pageMem = (PageMemoryImpl) region.pageMemory();
                    while (pickedPagesSet.size() < PAGES_TOUCHED_UNDER_CP_LOCK) {
                        int pageIdx = ThreadLocalRandom.current().nextInt(PAGES_TOUCHED_UNDER_CP_LOCK, pages - PAGES_TOUCHED_UNDER_CP_LOCK);
                        long pageId = PageIdUtils.pageId(0, PageIdAllocator.FLAG_DATA, pageIdx);
                        long page = pageMem.acquirePage(CU.cacheId(cacheName), pageId);
                        try {
                            // We do not know correct flag(FLAG_DATA or FLAG_AUX). Skip page if no luck.
                            if (pageId != PageIO.getPageId(page + PageMemoryImpl.PAGE_OVERHEAD))
                                continue;
                        } finally {
                            pageMem.releasePage(CU.cacheId(cacheName), pageId, page);
                        }
                        pickedPagesSet.add(new FullPageId(pageId, CU.cacheId(cacheName)));
                    }
                    List<FullPageId> pickedPages = new ArrayList<>(pickedPagesSet);
                    assertEquals(PAGES_TOUCHED_UNDER_CP_LOCK, pickedPages.size());
                    // Sort to avoid deadlocks on pages rw-locks.
                    pickedPages.sort(new Comparator<FullPageId>() {

                        @Override
                        public int compare(FullPageId o1, FullPageId o2) {
                            int cmp = Long.compare(o1.groupId(), o2.groupId());
                            if (cmp != 0)
                                return cmp;
                            return Long.compare(o1.effectivePageId(), o2.effectivePageId());
                        }
                    });
                    List<Long> readLockedPages = new ArrayList<>();
                    // Read lock many pages at once intentionally.
                    for (int i = 0; i < PAGES_TOUCHED_UNDER_CP_LOCK / 2; i++) {
                        FullPageId fpid = pickedPages.get(i);
                        long page = pageMem.acquirePage(fpid.groupId(), fpid.pageId());
                        long abs = pageMem.readLock(fpid.groupId(), fpid.pageId(), page);
                        assertFalse(fpid.toString(), abs == 0);
                        readLockedPages.add(page);
                    }
                    // Emulate writes to trigger throttling.
                    for (int i = PAGES_TOUCHED_UNDER_CP_LOCK / 2; i < PAGES_TOUCHED_UNDER_CP_LOCK && !stop.get(); i++) {
                        FullPageId fpid = pickedPages.get(i);
                        long page = pageMem.acquirePage(fpid.groupId(), fpid.pageId());
                        long abs = pageMem.writeLock(fpid.groupId(), fpid.pageId(), page);
                        assertFalse(fpid.toString(), abs == 0);
                        pageMem.writeUnlock(fpid.groupId(), fpid.pageId(), page, null, true);
                        pageMem.releasePage(fpid.groupId(), fpid.pageId(), page);
                    }
                    for (int i = 0; i < PAGES_TOUCHED_UNDER_CP_LOCK / 2; i++) {
                        FullPageId fpid = pickedPages.get(i);
                        pageMem.readUnlock(fpid.groupId(), fpid.pageId(), readLockedPages.get(i));
                        pageMem.releasePage(fpid.groupId(), fpid.pageId(), readLockedPages.get(i));
                    }
                } catch (Throwable e) {
                    log.error("Error in loader thread", e);
                    fail.set(true);
                } finally {
                    db.checkpointReadUnlock();
                }
                loops++;
            }
        }
    }, 10, "load-runner");
    // Await for the start of throttling.
    Thread.sleep(10_000);
    slowCheckpointEnabled.set(false);
    log.info(">>> Slow checkpoints disabled");
    assertFalse(fail.get());
    // Previous checkpoint should eventually finish.
    forceCheckpoint();
    stop.set(true);
    fut.get();
    db.enableCheckpoints(true).get();
    // check that there is no problem with pinned pages
    ig.destroyCache(cacheName);
    assertFalse(lsnr.check());
    log.unregisterListener(lsnr);
}
Also used : IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) ListeningTestLogger(org.apache.ignite.testframework.ListeningTestLogger) LogListener(org.apache.ignite.testframework.LogListener) PageStore(org.apache.ignite.internal.pagemem.store.PageStore) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion) FullPageId(org.apache.ignite.internal.pagemem.FullPageId) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IgniteEx(org.apache.ignite.internal.IgniteEx) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) PageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) PageIdAllocator(org.apache.ignite.internal.pagemem.PageIdAllocator) Set(java.util.Set) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) Test(org.junit.Test) IgniteCache(org.apache.ignite.IgniteCache) StopNodeFailureHandler(org.apache.ignite.failure.StopNodeFailureHandler) GridTestUtils(org.apache.ignite.testframework.GridTestUtils) PageMemoryImpl(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl) SF(org.apache.ignite.testframework.GridTestUtils.SF) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) PageIdUtils(org.apache.ignite.internal.pagemem.PageIdUtils) CU(org.apache.ignite.internal.util.typedef.internal.CU) IgniteDataStreamer(org.apache.ignite.IgniteDataStreamer) Comparator(java.util.Comparator) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) HashSet(java.util.HashSet) Set(java.util.Set) PageStore(org.apache.ignite.internal.pagemem.store.PageStore) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) Comparator(java.util.Comparator) PageMemoryImpl(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) ArrayList(java.util.ArrayList) List(java.util.List) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) FullPageId(org.apache.ignite.internal.pagemem.FullPageId) LogListener(org.apache.ignite.testframework.LogListener) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IgniteEx(org.apache.ignite.internal.IgniteEx) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion)

Example 15 with PageStore

use of org.apache.ignite.internal.pagemem.store.PageStore in project ignite by apache.

the class IgnitePdsRecoveryAfterFileCorruptionTest method eraseDataFromDisk.

/**
 * @param pageStore Page store.
 * @param cacheId Cache id.
 * @param page Page.
 */
private void eraseDataFromDisk(FilePageStoreManager pageStore, int cacheId, FullPageId page) throws IgniteCheckedException, IOException {
    PageStore store = pageStore.getStore(cacheId, PageIdUtils.partId(page.pageId()));
    FilePageStore filePageStore = (FilePageStore) store;
    FileIO fileIO = U.field(filePageStore, "fileIO");
    long size = fileIO.size();
    fileIO.writeFully(ByteBuffer.allocate((int) size - filePageStore.headerSize()), filePageStore.headerSize());
    fileIO.force();
}
Also used : PageStore(org.apache.ignite.internal.pagemem.store.PageStore) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FileIO(org.apache.ignite.internal.processors.cache.persistence.file.FileIO)

Aggregations

PageStore (org.apache.ignite.internal.pagemem.store.PageStore)27 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)10 FilePageStoreManager (org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager)9 PageMemoryEx (org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx)9 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 IgniteException (org.apache.ignite.IgniteException)6 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)5 List (java.util.List)5 Map (java.util.Map)5 GridCacheSharedContext (org.apache.ignite.internal.processors.cache.GridCacheSharedContext)5 GridCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager)5 PageIO (org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO)5 File (java.io.File)4 ByteBuffer (java.nio.ByteBuffer)4 HashMap (java.util.HashMap)4 Set (java.util.Set)4 FailureContext (org.apache.ignite.failure.FailureContext)4 IgniteInternalFuture (org.apache.ignite.internal.IgniteInternalFuture)4 FullPageId (org.apache.ignite.internal.pagemem.FullPageId)4