use of org.neo4j.kernel.impl.store.format.ForcedSecondaryUnitRecordFormats in project neo4j by neo4j.
the class BatchingNeoStoresTest method shouldDecideToAllocateDoubleRelationshipRecordUnitsOnLargeAmountOfRelationshipsOnSupportedFormat.
@Test
void shouldDecideToAllocateDoubleRelationshipRecordUnitsOnLargeAmountOfRelationshipsOnSupportedFormat() throws Exception {
// given
RecordFormats formats = new ForcedSecondaryUnitRecordFormats(LATEST_RECORD_FORMATS);
try (BatchingNeoStores stores = BatchingNeoStores.batchingNeoStoresWithExternalPageCache(fileSystem, pageCache, PageCacheTracer.NULL, databaseLayout, formats, Configuration.DEFAULT, NullLogService.getInstance(), EMPTY, Config.defaults(), INSTANCE)) {
stores.createNew();
Input.Estimates estimates = Input.knownEstimates(0, DOUBLE_RELATIONSHIP_RECORD_UNIT_THRESHOLD << 1, 0, 0, 0, 0, 0);
// when
boolean doubleUnits = stores.determineDoubleRelationshipRecordUnits(estimates);
// then
assertTrue(doubleUnits);
}
}
use of org.neo4j.kernel.impl.store.format.ForcedSecondaryUnitRecordFormats in project neo4j by neo4j.
the class BatchingNeoStoresTest method shouldNotDecideToAllocateDoubleRelationshipRecordUnitsonLowAmountOfRelationshipsOnSupportedFormat.
@Test
void shouldNotDecideToAllocateDoubleRelationshipRecordUnitsonLowAmountOfRelationshipsOnSupportedFormat() throws Exception {
// given
RecordFormats formats = new ForcedSecondaryUnitRecordFormats(LATEST_RECORD_FORMATS);
try (BatchingNeoStores stores = BatchingNeoStores.batchingNeoStoresWithExternalPageCache(fileSystem, pageCache, PageCacheTracer.NULL, databaseLayout, formats, Configuration.DEFAULT, NullLogService.getInstance(), EMPTY, Config.defaults(), INSTANCE)) {
stores.createNew();
Input.Estimates estimates = Input.knownEstimates(0, DOUBLE_RELATIONSHIP_RECORD_UNIT_THRESHOLD >> 1, 0, 0, 0, 0, 0);
// when
boolean doubleUnits = stores.determineDoubleRelationshipRecordUnits(estimates);
// then
assertFalse(doubleUnits);
}
}
Aggregations