@@ -42,6 +42,7 @@ public class AqlQueryOptions implements Serializable {
4242 private Integer ttl ;
4343 private Integer batchSize ;
4444 private Boolean cache ;
45+ private Boolean fillBlockCache ;
4546 private Long memoryLimit ;
4647 private VPackSlice bindVars ;
4748 private String query ;
@@ -131,6 +132,26 @@ public AqlQueryOptions cache(final Boolean cache) {
131132 return this ;
132133 }
133134
135+ public Boolean getFillBlockCache () {
136+ return options != null ? options .fillBlockCache : null ;
137+ }
138+
139+ /**
140+ * @param fillBlockCache if set to <code>true</code> or not specified, this will make the query store
141+ * the data it reads via the RocksDB storage engine in the RocksDB block cache. This is
142+ * usually the desired behavior. The option can be set to <code>false</code> for queries that
143+ * are known to either read a lot of data that would thrash the block cache, or for queries
144+ * that read data known to be outside of the hot set. By setting the option
145+ * to <code>false</code>, data read by the query will not make it into the RocksDB block cache if
146+ * it is not already in there, thus leaving more room for the actual hot set.
147+ * @return options
148+ * @since ArangoDB 3.8.1
149+ */
150+ public AqlQueryOptions fillBlockCache (final Boolean fillBlockCache ) {
151+ getOptions ().fillBlockCache = fillBlockCache ;
152+ return this ;
153+ }
154+
134155 protected VPackSlice getBindVars () {
135156 return bindVars ;
136157 }
@@ -407,6 +428,7 @@ private static class Options implements Serializable {
407428 private Boolean stream ;
408429 private Collection <String > shardIds ;
409430 private Double maxRuntime ;
431+ private Boolean fillBlockCache ;
410432
411433 protected Optimizer getOptimizer () {
412434 if (optimizer == null ) {
0 commit comments