Search in sources :

Example 26 with NeoStoreRecord

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

the class PhysicalLogCommandReaderV3_0 method readNeoStoreRecord.

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

Example 27 with NeoStoreRecord

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

the class MetaDataStoreCheckTest method shouldNotReportAnythingForRecordWithConsistentReferenceToProperty.

@Test
public void shouldNotReportAnythingForRecordWithConsistentReferenceToProperty() throws Exception {
    // given
    NeoStoreRecord record = new NeoStoreRecord();
    record.setNextProp(add(inUse(new PropertyRecord(7))).getId());
    // when
    ConsistencyReport.NeoStoreConsistencyReport report = check(record);
    // then
    verifyNoMoreInteractions(report);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) PropertyRecord(org.neo4j.kernel.impl.store.record.PropertyRecord) ConsistencyReport(org.neo4j.consistency.report.ConsistencyReport) Test(org.junit.Test)

Example 28 with NeoStoreRecord

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

the class MetaDataStoreCheckTest method shouldReportPropertyNotInUse.

@Test
public void shouldReportPropertyNotInUse() throws Exception {
    // given
    NeoStoreRecord record = new NeoStoreRecord();
    PropertyRecord property = add(notInUse(new PropertyRecord(7)));
    record.setNextProp(property.getId());
    // when
    ConsistencyReport.NeoStoreConsistencyReport report = check(record);
    // then
    verify(report).propertyNotInUse(property);
    verifyNoMoreInteractions(report);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) PropertyRecord(org.neo4j.kernel.impl.store.record.PropertyRecord) ConsistencyReport(org.neo4j.consistency.report.ConsistencyReport) Test(org.junit.Test)

Example 29 with NeoStoreRecord

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

the class MetaDataStoreCheckTest method shouldNotReportAnythingForRecordWithNoPropertyReference.

@Test
public void shouldNotReportAnythingForRecordWithNoPropertyReference() throws Exception {
    // given
    NeoStoreRecord record = new NeoStoreRecord();
    // when
    ConsistencyReport.NeoStoreConsistencyReport report = check(record);
    // then
    verifyNoMoreInteractions(report);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) ConsistencyReport(org.neo4j.consistency.report.ConsistencyReport) Test(org.junit.Test)

Example 30 with NeoStoreRecord

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

the class OwnerCheckTest method shouldNotReportOrphanIfOwnedByNeoStore.

@Test
public void shouldNotReportOrphanIfOwnedByNeoStore() throws Exception {
    // given
    RecordAccessStub records = new RecordAccessStub();
    OwnerCheck decorator = new OwnerCheck(true);
    PropertyRecord record = inUse(new PropertyRecord(42));
    ConsistencyReport.PropertyConsistencyReport report = check(ConsistencyReport.PropertyConsistencyReport.class, decorator.decoratePropertyChecker(dummyPropertyChecker()), record, records);
    NeoStoreRecord master = inUse(new NeoStoreRecord());
    master.setNextProp(42);
    ConsistencyReport.NeoStoreConsistencyReport masterReport = check(ConsistencyReport.NeoStoreConsistencyReport.class, decorator.decorateNeoStoreChecker(dummyNeoStoreCheck()), master, records);
    // when
    decorator.scanForOrphanChains(ProgressMonitorFactory.NONE);
    records.checkDeferred();
    // then
    verifyNoMoreInteractions(report);
    verifyNoMoreInteractions(masterReport);
}
Also used : NeoStoreRecord(org.neo4j.kernel.impl.store.record.NeoStoreRecord) PropertyRecord(org.neo4j.kernel.impl.store.record.PropertyRecord) RecordAccessStub(org.neo4j.consistency.store.RecordAccessStub) ConsistencyReport(org.neo4j.consistency.report.ConsistencyReport) Test(org.junit.Test)

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