File tree Expand file tree Collapse file tree
main/java/org/eclipse/rdf4j/sail/lmdb
test/java/org/eclipse/rdf4j/sail/lmdb/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ public LmdbStore(LmdbStoreConfig config) {
133133 IsolationLevels .SNAPSHOT , IsolationLevels .SERIALIZABLE );
134134 setDefaultIsolationLevel (IsolationLevels .SNAPSHOT_READ );
135135 config .getDefaultQueryEvaluationMode ().ifPresent (this ::setDefaultQueryEvaluationMode );
136+ if (config .getIterationCacheSyncThreshold () > 0 ) {
137+ setIterationCacheSyncThreshold (config .getIterationCacheSyncThreshold ());
138+ }
136139 EvaluationStrategyFactory evalStrategyFactory = config .getEvaluationStrategyFactory ();
137140 if (evalStrategyFactory != null ) {
138141 setEvaluationStrategyFactory (evalStrategyFactory );
Original file line number Diff line number Diff line change 2222import org .eclipse .rdf4j .model .impl .LinkedHashModel ;
2323import org .eclipse .rdf4j .model .util .ModelBuilder ;
2424import org .eclipse .rdf4j .model .util .Values ;
25+ import org .eclipse .rdf4j .sail .lmdb .LmdbStore ;
26+ import org .junit .jupiter .api .Test ;
2527import org .junit .jupiter .params .ParameterizedTest ;
2628import org .junit .jupiter .params .provider .ValueSource ;
2729
@@ -65,6 +67,17 @@ void testThatLmdbStoreConfigParseAndExportValueCacheSize(final int valueCacheSiz
6567
6668 // TODO: Add more tests for other properties
6769
70+ @ Test
71+ void setIterationCacheSyncThresholdShouldApplyToCreatedStore () {
72+ final long threshold = 42 ;
73+ final LmdbStoreConfig config = new LmdbStoreConfig ();
74+ config .setIterationCacheSyncThreshold (threshold );
75+
76+ final LmdbStore store = new LmdbStore (config );
77+
78+ assertThat (store .getIterationCacheSyncThreshold ()).isEqualTo (threshold );
79+ }
80+
6881 /**
6982 * Generic method to test parsing and exporting of config properties.
7083 *
You can’t perform that action at this time.
0 commit comments