use of org.neo4j.kernel.impl.transaction.log.files.LogTailInformation in project neo4j by neo4j.
the class AbstractLogTailScannerTest method oneLogFileNoCheckPointsOneStart.
@ParameterizedTest
@MethodSource("params")
void oneLogFileNoCheckPointsOneStart(int startLogVersion, int endLogVersion) {
// given
long txId = 10;
setupLogFiles(endLogVersion, logFile(start(), commit(txId)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(false, true, txId, false, logTailInformation);
}
use of org.neo4j.kernel.impl.transaction.log.files.LogTailInformation in project neo4j by neo4j.
the class AbstractLogTailScannerTest method twoLogFilesCheckPointTargetsPrevious.
@ParameterizedTest
@MethodSource("params")
void twoLogFilesCheckPointTargetsPrevious(int startLogVersion, int endLogVersion) {
// given
long txId = 6;
PositionEntry position = position();
setupLogFiles(endLogVersion, logFile(start(), commit(txId - 1), position), logFile(start(), commit(txId)), logFile(checkPoint(position)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, true, txId, false, logTailInformation);
}
use of org.neo4j.kernel.impl.transaction.log.files.LogTailInformation in project neo4j by neo4j.
the class AbstractLogTailScannerTest method latestLogFileContainingACheckPointAndAStartBefore.
@ParameterizedTest
@MethodSource("params")
void latestLogFileContainingACheckPointAndAStartBefore(int startLogVersion, int endLogVersion) {
// given
setupLogFiles(endLogVersion, logFile(start(), commit(1), checkPoint()));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, false, NO_TRANSACTION_ID, false, logTailInformation);
}
use of org.neo4j.kernel.impl.transaction.log.files.LogTailInformation in project neo4j by neo4j.
the class AbstractLogTailScannerTest method twoLogFilesSecondIsCorruptedBeforeAfterCommit.
@ParameterizedTest
@MethodSource("params")
void twoLogFilesSecondIsCorruptedBeforeAfterCommit(int startLogVersion, int endLogVersion) throws IOException {
int firstTxId = 2;
setupLogFiles(endLogVersion, logFile(checkPoint()), logFile(start(), commit(firstTxId), start(), commit(3)));
Path highestLogFile = logFiles.getLogFile().getHighestLogFile();
fs.truncate(highestLogFile, fs.getFileSize(highestLogFile) - 3);
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, true, firstTxId, false, logTailInformation);
}
use of org.neo4j.kernel.impl.transaction.log.files.LogTailInformation in project neo4j by neo4j.
the class AbstractLogTailScannerTest method olderLogFileContainingAStartAndNewerFileContainingACheckPointPointingToAPreviousPositionThanStartWithoutCommit.
@ParameterizedTest
@MethodSource("params")
void olderLogFileContainingAStartAndNewerFileContainingACheckPointPointingToAPreviousPositionThanStartWithoutCommit(int startLogVersion, int endLogVersion) {
// given
StartEntry start = start();
PositionEntry position = position();
setupLogFiles(endLogVersion, logFile(start, position), logFile(checkPoint(position)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, false, NO_TRANSACTION_ID, false, logTailInformation);
}
Aggregations