Skip to content

Commit 27b1522

Browse files
authored
[9.1.1] Turn direct IO off by default (#132002)
1 parent 04cbfc0 commit 27b1522

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/index/store/DirectIOIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.apache.lucene.store.IndexOutput;
1818
import org.apache.lucene.tests.util.LuceneTestCase;
1919
import org.elasticsearch.common.settings.Settings;
20+
import org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat;
2021
import org.elasticsearch.plugins.Plugin;
2122
import org.elasticsearch.search.vectors.KnnSearchBuilder;
2223
import org.elasticsearch.search.vectors.VectorData;
@@ -46,6 +47,7 @@ public class DirectIOIT extends ESIntegTestCase {
4647

4748
@BeforeClass
4849
public static void checkSupported() throws IOException {
50+
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
4951
Path path = createTempDir("directIOProbe");
5052
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
5153
out.writeString("test");

server/src/main/java/org/elasticsearch/index/codec/vectors/es818/ES818BinaryQuantizedVectorsFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
*/
8888
public class ES818BinaryQuantizedVectorsFormat extends FlatVectorsFormat {
8989

90-
static final boolean USE_DIRECT_IO = Boolean.parseBoolean(System.getProperty("vector.rescoring.directio", "true"));
90+
public static final boolean USE_DIRECT_IO = Boolean.parseBoolean(System.getProperty("vector.rescoring.directio", "false"));
9191

9292
public static final String BINARIZED_VECTOR_COMPONENT = "BVEC";
9393
public static final String NAME = "ES818BinaryQuantizedVectorsFormat";

server/src/test/java/org/elasticsearch/index/codec/vectors/es818/ES818BinaryQuantizedVectorsFormatTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ private Directory newFSDirectory() throws IOException {
373373
}
374374

375375
static void checkDirectIOSupported() {
376+
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
376377
Path path = createTempDir("directIOProbe");
377378
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
378379
out.writeString("test");

server/src/test/java/org/elasticsearch/index/codec/vectors/es818/ES818HnswBinaryQuantizedVectorsFormatTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ private Directory newFSDirectory() throws IOException {
221221
}
222222

223223
static void checkDirectIOSupported() {
224+
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
224225
Path path = createTempDir("directIOProbe");
225226
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
226227
out.writeString("test");

0 commit comments

Comments
 (0)