Search in sources :

Example 21 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class MessageConsistencyLoggerTest method shouldFormatWarningForRecord.

@Test
void shouldFormatWarningForRecord() {
    // when
    logger.warning(RecordType.NEO_STORE, new NeoStoreRecord(), "sample message", 1, 2);
    // then
    logMatcher.forLevel(WARN).containsMessages(join("sample message", neoStoreRecord(true, -1), "Inconsistent with: 1 2"));
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) Test(org.junit.jupiter.api.Test)

Example 22 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class NeoStoreCheckTypeTest method inUseRecordEquality.

@Test
public void inUseRecordEquality() {
    NeoStoreRecord record1 = new NeoStoreRecord();
    record1.initialize(true, 1);
    NeoStoreRecord record2 = record1.clone();
    NeoStoreCheckType check = new NeoStoreCheckType();
    assertTrue(check.equal(record1, record2));
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) Test(org.junit.Test)

Example 23 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV3_0_2 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    NeoStoreRecord before = readNeoStoreRecord(channel);
    NeoStoreRecord after = readNeoStoreRecord(channel);
    return new Command.NeoStoreCommand(before, after);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 24 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV2_2_4 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    long nextProp = channel.getLong();
    NeoStoreRecord record = new NeoStoreRecord();
    record.setNextProp(nextProp);
    return new Command.NeoStoreCommand(null, record);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Example 25 with NeoStoreRecord

use of org.neo4j.kernel.impl.store.record.NeoStoreRecord in project neo4j by neo4j.

the class PhysicalLogCommandReaderV3_0 method visitNeoStoreCommand.

private Command visitNeoStoreCommand(ReadableChannel channel) throws IOException {
    NeoStoreRecord before = readNeoStoreRecord(channel);
    NeoStoreRecord after = readNeoStoreRecord(channel);
    return new Command.NeoStoreCommand(before, after);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord)

Aggregations

NeoStoreRecord (org.neo4j.kernel.impl.store.record.NeoStoreRecord)36 Test (org.junit.Test)16 ConsistencyReport (org.neo4j.consistency.report.ConsistencyReport)9 Test (org.junit.jupiter.api.Test)5 RecordAccessStub (org.neo4j.consistency.store.RecordAccessStub)5 PropertyRecord (org.neo4j.kernel.impl.store.record.PropertyRecord)5 NodeRecord (org.neo4j.kernel.impl.store.record.NodeRecord)3 RelationshipRecord (org.neo4j.kernel.impl.store.record.RelationshipRecord)3 Command (org.neo4j.kernel.impl.transaction.command.Command)3 File (java.io.File)2 BatchTransactionApplier (org.neo4j.kernel.impl.api.BatchTransactionApplier)2 LabelTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.LabelTokenCommand)2 PropertyKeyTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.PropertyKeyTokenCommand)2 RelationshipTypeTokenCommand (org.neo4j.kernel.impl.transaction.command.Command.RelationshipTypeTokenCommand)2 InMemoryClosableChannel (org.neo4j.kernel.impl.transaction.log.InMemoryClosableChannel)2 PhysicalLogFile (org.neo4j.kernel.impl.transaction.log.PhysicalLogFile)2 PhysicalLogFiles (org.neo4j.kernel.impl.transaction.log.PhysicalLogFiles)2 LabelTokenRecord (org.neo4j.kernel.impl.store.record.LabelTokenRecord)1 PrimitiveRecord (org.neo4j.kernel.impl.store.record.PrimitiveRecord)1 PropertyKeyTokenRecord (org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord)1