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; }
} else { this.opState.initialize(OPLOG_CONFLICT_VERSION, dr.getId(), tag); adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);
long temp = (getOpStateSize() + this.crf.currSize); if (!this.wroteNewEntryBase) { temp += OPLOG_NEW_ENTRY_BASE_REC_SIZE; useNextOplog = true; } else if (temp > getMaxCrfSize() && !isFirstRecord()) { switchOpLog(dr, getOpStateSize(), entry); useNextOplog = true; } else { int dataLength = getOpStateSize();
int adjustment = getOpStateSize();
} else { this.opState.initialize(oplogKeyId, keyBytes, valueBytes, userBits, drId, tag, false); adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);
long temp = (getOpStateSize() + this.crf.currSize); if (!this.wroteNewEntryBase) { temp += OPLOG_NEW_ENTRY_BASE_REC_SIZE; switchOpLog(dr, getOpStateSize(), entry, false); int dataLength = getOpStateSize();
} else { this.opState.initialize(OPLOG_CONFLICT_VERSION, dr.getId(), tag); adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);
this.opState.initialize(oplogKeyId, keyBytes, valueBytes, userBits, drId, tag, lastModifiedTime, false); adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);
} else { initOpState(OPLOG_MOD_ENTRY_1ID, dr, entry, value, userBits, false); adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);
int adjustment = getOpStateSize();
adjustment = getOpStateSize(); assert adjustment > 0; long temp = (this.crf.currSize + adjustment);