From a26e0b9bccd9128ad362686b3a286800d4e49cb6 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sun, 24 Nov 2024 16:08:17 +0100 Subject: [PATCH 1/2] Fix format string. --- .../src/vespa/searchcore/proton/matchengine/matchengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp index bfb14e14126..55cc84107f1 100644 --- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp +++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp @@ -163,7 +163,7 @@ MatchEngine::doSearch(const SearchRequest & searchRequest) { vespalib::Issue::report("search request timed out; results may be incomplete"); } searchRequest.trace().addEvent(4, - vespalib::make_string("returning %zu hits from total %zu", + vespalib::make_string("returning %zu hits from total %" PRIu64, ret->hits.size(), ret->totalHitCount)); return ret; } From 1a6b9b5de355a911ab9c65c90e5f9011158fd69c Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sun, 24 Nov 2024 17:46:58 +0100 Subject: [PATCH 2/2] Direct io read is only enabled on linux. --- searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp b/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp index 213b4360dc9..97e1d00577a 100644 --- a/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp +++ b/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp @@ -270,7 +270,11 @@ DiskIndexTest::requireThatWeCanReadPostingList(const IOSettings& io_settings) EXPECT_EQ(SimpleResult({1,3}), search(field_index, r, h)); if (io_settings._use_directio && !io_settings._use_mmap) { auto directio_handle = field_index.read_uncached_posting_list(r, false); +#ifdef __linux__ EXPECT_LT(256, directio_handle._allocSize); +#else + EXPECT_GT(64, directio_handle._allocSize); +#endif EXPECT_EQ(SimpleResult({1,3}), search(field_index, r, directio_handle)); auto trimmed_directio_handle = field_index.read_uncached_posting_list(r, true); EXPECT_GT(64, trimmed_directio_handle._allocSize);