@@ -42,6 +42,7 @@ public class AqlQueryOptions implements Serializable {
42
42
private Integer ttl ;
43
43
private Integer batchSize ;
44
44
private Boolean cache ;
45
+ private Boolean fillBlockCache ;
45
46
private Long memoryLimit ;
46
47
private VPackSlice bindVars ;
47
48
private String query ;
@@ -131,6 +132,26 @@ public AqlQueryOptions cache(final Boolean cache) {
131
132
return this ;
132
133
}
133
134
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
+
134
155
protected VPackSlice getBindVars () {
135
156
return bindVars ;
136
157
}
@@ -407,6 +428,7 @@ private static class Options implements Serializable {
407
428
private Boolean stream ;
408
429
private Collection <String > shardIds ;
409
430
private Double maxRuntime ;
431
+ private Boolean fillBlockCache ;
410
432
411
433
protected Optimizer getOptimizer () {
412
434
if (optimizer == null ) {
0 commit comments