private void preblow() { this.dirHolder.incrementTotalOplogSize(this.maxOplogSize); final OplogFile olf = getOLF(); try { olf.raf.setLength(this.maxOplogSize); olf.raf.seek(0); } catch (IOException ioe) { // @todo need a warning since this can impact perf. // I don't think I need any of this. If setLength throws then // the file is still ok. // raf.close(); // if (!this.opLogFile.delete() && this.opLogFile.exists()) { // throw new DiskAccessException(LocalizedStrings.NewLBHTreeDiskRegion_COULD_NOT_DELETE__0_.toLocalizedString(this.opLogFile.getAbsolutePath()), this.owner); // } // f = new File(this.diskFile.getPath() + OPLOG_FILE_EXT); // this.opLogFile = f; // raf = new RandomAccessFile(f, "rw"); } } /**
private void preblow() { this.dirHolder.incrementTotalOplogSize(this.maxOplogSize); final OplogFile olf = getOLF(); try { olf.raf.setLength(this.maxOplogSize); olf.raf.seek(0); } catch (IOException ioe) { // @todo need a warning since this can impact perf. // if (this.logger.warningEnabled()) { // this.logger.warning( // LocalizedStrings.Oplog_OPLOGCREATEOPLOGEXCEPTION_IN_PREBLOWING_THE_FILE_A_NEW_RAF_OBJECT_FOR_THE_OPLOG_FILE_WILL_BE_CREATED_WILL_NOT_BE_PREBLOWNEXCEPTION_STRING_IS_0, // ioe, null); // } // I don't think I need any of this. If setLength throws then // the file is still ok. // raf.close(); // if (!this.opLogFile.delete() && this.opLogFile.exists()) { // throw new DiskAccessException(LocalizedStrings.NewLBHTreeDiskRegion_COULD_NOT_DELETE__0_.toLocalizedString(this.opLogFile.getAbsolutePath()), this.owner); // } // f = new File(this.diskFile.getPath() + OPLOG_FILE_EXT); // if (logger.fineEnabled()) // logger.fine("Creating operation log file " + f); // this.opLogFile = f; // raf = new RandomAccessFile(f, "rw"); } } /**
private void writeProductVersionRecord(Version version, OplogFile olf) throws IOException { this.opState.initialize(version.ordinal()); writeOpLogBytes(olf, false, true); olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
private void writeProductVersionRecord(Version version, OplogFile olf) throws IOException { this.opState.initialize(version.ordinal()); writeOpLogBytes(olf, false, true); olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
/** * Write the RVV record for the given regions. * @param olf the oplog to write to * @param diskRegions the set of disk regions we should write the RVV of * @param writeGCRVV true to write write the GC RVV * @throws IOException */ private void writeRVVRecord(OplogFile olf, Map<Long, AbstractDiskRegion> diskRegions, boolean writeGCRVV) throws IOException { this.opState = new OpState(); this.opState.initialize(diskRegions, writeGCRVV); writeOpLogBytes(olf, false, true); // fix for bug 41928 olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
private void writeDiskStoreRecord(OplogFile olf, OPLOG_TYPE type) throws IOException { this.opState = new OpState(); this.opState.initialize(type); writeOpLogBytes(olf, false, true); olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); clearOpState(); this.opState.initialize(getParent().getDiskStoreID()); writeOpLogBytes(olf, false, true); // fix for bug 41928 olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
/** * Write the RVV record for the given regions. * * @param olf * the oplog to write to * @param diskRegions * the set of disk regions we should write the RVV of * @param writeGCRVV * true to write write the GC RVV * @throws IOException */ private void writeRVVRecord(OplogFile olf, Map<Long, AbstractDiskRegion> diskRegions, boolean writeGCRVV) throws IOException { this.opState = new OpState(); this.opState.initialize(diskRegions, writeGCRVV); writeOpLogBytes(olf, false, true); // fix for bug 41928 olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
private void writeDiskStoreRecord(OplogFile olf) throws IOException { this.opState = new OpState(); this.opState.initialize(getParent().getDiskStoreID()); writeOpLogBytes(olf, false, true); // fix for bug 41928 olf.currSize += getOpStateSize(); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); }
/** * Write a OPLOG_NEW_ENTRY_BASE_ID to this oplog. Must be called before any * OPLOG_NEW_ENTRY_0ID records are written to this oplog. */ private boolean writeNewEntryBaseRecord(boolean async) throws IOException { if (this.wroteNewEntryBase) return false; this.wroteNewEntryBase = true; long newEntryBase = getOplogSet().getOplogEntryId(); OpState saved = this.opState; try { this.opState = new OpState(); this.opState.initialize(newEntryBase); writeOpLogBytes(this.crf, async, false/* no need to flush this record */); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); } finally { this.opState = saved; } return true; }
/** * Write a OPLOG_NEW_ENTRY_BASE_ID to this oplog. * Must be called before any OPLOG_NEW_ENTRY_0ID records are written * to this oplog. */ private boolean writeNewEntryBaseRecord(boolean async) throws IOException { if (this.wroteNewEntryBase) return false; this.wroteNewEntryBase = true; long newEntryBase = getOplogSet().getOplogEntryId(); // logger.info(LocalizedStrings.DEBUG, "DEBUG newEntryBase=" + newEntryBase + " oplog#" + getOplogId()); OpState saved = this.opState; try { this.opState = new OpState(); this.opState.initialize(newEntryBase); writeOpLogBytes(this.crf, async, false/*no need to flush this record*/); this.dirHolder.incrementTotalOplogSize(getOpStateSize()); } finally { this.opState = saved; } // { // LogWriterI18n l = parent.getOwner().getCache().getLoggerI18n(); // l.info(LocalizedStrings.DEBUG, "base inc=" + OPLOG_NEW_ENTRY_BASE_REC_SIZE + " currSize=" + this.crf.currSize); // } return true; }
this.dirHolder.incrementTotalOplogSize(byteCount);
this.dirHolder.incrementTotalOplogSize(byteCount);
this.dirHolder.incrementTotalOplogSize(byteCount);
getOplogId()); this.dirHolder.incrementTotalOplogSize(adjustment);
logger.trace("Oplog::basicRemove:Released ByteBuffer for Disk ID = {}", id); this.dirHolder.incrementTotalOplogSize(adjustment);
this.dirHolder.incrementTotalOplogSize(adjustment); this.incTotalCount();
this.dirHolder.incrementTotalOplogSize(dataLength); incTotalCount();
+ " oplog#" + getOplogId()); this.dirHolder.incrementTotalOplogSize(adjustment);
+ " oplog#" + getOplogId()); this.dirHolder.incrementTotalOplogSize(adjustment); this.incTotalCount(); clearOpState();
+ id.toString()); this.dirHolder.incrementTotalOplogSize(adjustment);