diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-27 23:10:03 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-27 23:10:03 +0000 |
commit | 117cd771441cf1b8cc1f93541f8868e0b1b8e46e (patch) | |
tree | 3fc27f8c6233648cb65693ca4bc61120b5033a3e /searchlib | |
parent | 184f37836ae30b7c468dd4b1305695939ed92357 (diff) |
Hide Fast_BufferedFile better.
Diffstat (limited to 'searchlib')
24 files changed, 75 insertions, 74 deletions
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp index bd84a6ca419..a26e751ae73 100644 --- a/searchlib/src/tests/attribute/attribute_test.cpp +++ b/searchlib/src/tests/attribute/attribute_test.cpp @@ -5,16 +5,13 @@ #include <vespa/document/update/arithmeticvalueupdate.h> #include <vespa/document/update/assignvalueupdate.h> #include <vespa/document/update/mapvalueupdate.h> -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/attribute/address_space_components.h> #include <vespa/searchlib/attribute/attribute.h> #include <vespa/searchlib/attribute/attributefactory.h> #include <vespa/searchlib/attribute/attributeguard.h> #include <vespa/searchlib/attribute/attributememorysavetarget.h> #include <vespa/searchlib/attribute/attributevector.hpp> -#include <vespa/searchlib/attribute/attrvector.h> #include <vespa/searchlib/attribute/multienumattribute.hpp> -#include <vespa/searchlib/attribute/multinumericattribute.h> #include <vespa/searchlib/attribute/multistringattribute.h> #include <vespa/searchlib/attribute/multivalueattribute.hpp> #include <vespa/searchlib/attribute/predicate_attribute.h> @@ -25,6 +22,7 @@ #include <vespa/searchlib/util/randomgenerator.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/fastos/file.h> #include <cmath> #include <iostream> @@ -41,6 +39,8 @@ using search::attribute::IAttributeVector; using vespalib::stringref; using vespalib::string; +namespace search { + namespace { string empty; @@ -157,8 +157,6 @@ bool contains_value(const Container& c, size_t elems, const V& value) { } -namespace search { - using attribute::CollectionType; using attribute::Config; diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h index 90d08fa681c..acd00413568 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.h +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h @@ -26,9 +26,6 @@ #include <mutex> #include <shared_mutex> -class Fast_BufferedFile; -class FastOS_FileInterface; - namespace document { class ArithmeticValueUpdate; class AssignValueUpdate; diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp index 87f1985d7c0..f398fe0b46b 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp @@ -4,7 +4,6 @@ #include "attrvector.h" #include "load_utils.h" #include <vespa/vespalib/util/hdr_abort.h> -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/util/filekit.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp index 10f837ec1ab..73d248a21fa 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp @@ -8,7 +8,6 @@ #include "multinumericattributesaver.h" #include "load_utils.h" #include "primitivereader.h" -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/query/query_term_simple.h> #include <vespa/searchlib/queryeval/emptysearch.h> #include <vespa/searchlib/util/fileutil.h> diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp index 5449f85bf68..4322faefe67 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp @@ -6,7 +6,6 @@ #include "load_utils.h" #include "loadednumericvalue.h" #include "multinumericenumattribute.h" -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/query/query_term_simple.h> #include <vespa/searchlib/queryeval/emptysearch.h> #include <vespa/searchlib/util/fileutil.hpp> diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp index 89cd8ca310a..c8330225fb9 100644 --- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp @@ -6,7 +6,6 @@ #include "multistringattribute.h" #include "enumattribute.hpp" #include "multienumattribute.hpp" -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/vespalib/text/utf8.h> #include <vespa/vespalib/text/lowercase.h> #include <vespa/searchlib/util/bufferwriter.h> diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp index 2bb4d2ada60..a1f8b42df2f 100644 --- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp @@ -5,7 +5,6 @@ #include "stringattribute.h" #include "multistringpostattribute.h" #include "multistringattribute.hpp" -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/query/query_term_simple.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/attribute/readerbase.cpp b/searchlib/src/vespa/searchlib/attribute/readerbase.cpp index f08130b9fbe..d023d9b56b1 100644 --- a/searchlib/src/vespa/searchlib/attribute/readerbase.cpp +++ b/searchlib/src/vespa/searchlib/attribute/readerbase.cpp @@ -5,7 +5,6 @@ #include "readerbase.h" #include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/util/filesizecalculator.h> -#include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/size_literals.h> #include <vespa/log/log.h> diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp index 606c99161be..730ad1107a7 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp @@ -6,7 +6,6 @@ #include "stringattribute.h" #include "singleenumattribute.hpp" #include "attributevector.hpp" -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/vespalib/text/utf8.h> #include <vespa/vespalib/text/lowercase.h> #include <vespa/searchlib/util/bufferwriter.h> diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp index d2b02b02a87..70309645ee2 100644 --- a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp @@ -7,6 +7,7 @@ #include <vespa/searchlib/util/file_settings.h> #include <vespa/vespalib/data/fileheader.h> #include <vespa/vespalib/util/size_literals.h> +#include <vespa/fastlib/io/bufferedfile.h> #include <cassert> namespace search::diskindex { @@ -29,17 +30,13 @@ readHeader(vespalib::FileHeader &h, BitVectorFileWrite::BitVectorFileWrite(BitVectorKeyScope scope) : BitVectorIdxFileWrite(scope), - _datFile(nullptr), + _datFile(), _datHeaderLen(0) { } -BitVectorFileWrite::~BitVectorFileWrite() -{ - // No implicit close() call, but cleanup memory allocations. - delete _datFile; -} +BitVectorFileWrite::~BitVectorFileWrite() = default; void @@ -50,12 +47,11 @@ BitVectorFileWrite::open(const vespalib::string &name, { vespalib::string datname = name + ".bdat"; - assert(_datFile == nullptr); + assert( ! _datFile); Parent::open(name, docIdLimit, tuneFileWrite, fileHeaderContext); - FastOS_FileInterface *datfile = new FastOS_File; - _datFile = new Fast_BufferedFile(datfile); + _datFile = std::make_unique<Fast_BufferedFile>(new FastOS_File); if (tuneFileWrite.getWantSyncWrites()) { _datFile->EnableSyncWrites(); } @@ -115,13 +111,13 @@ BitVectorFileWrite::updateDatHeader(uint64_t fileBitSize) h.putTag(Tag("numKeys", _numKeys)); h.putTag(Tag("frozen", 1)); h.putTag(Tag("fileBitSize", fileBitSize)); - _datFile->Flush(); - _datFile->Sync(); + bool sync_ok = _datFile->Sync(); + assert(sync_ok); assert(h.getSize() == _datHeaderLen); _datFile->SetPosition(0); h.writeFile(*_datFile); - _datFile->Flush(); - _datFile->Sync(); + sync_ok = _datFile->Sync(); + assert(sync_ok); } @@ -150,7 +146,8 @@ BitVectorFileWrite::sync() { flush(); Parent::syncCommon(); - _datFile->Sync(); + bool sync_ok = _datFile->Sync(); + assert(sync_ok); } @@ -167,10 +164,10 @@ BitVectorFileWrite::close() (void) bitmapbytes; _datFile->alignEndForDirectIO(); updateDatHeader(pos * 8); - _datFile->Close(); + bool close_ok = _datFile->Close(); + assert(close_ok); } - delete _datFile; - _datFile = nullptr; + _datFile.reset(); } Parent::close(); } diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.h b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.h index 37ca72d3ec0..007368babdd 100644 --- a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.h +++ b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.h @@ -2,12 +2,13 @@ #pragma once -#include <vespa/fastlib/io/bufferedfile.h> +#include "bitvectoridxfile.h" #include <vespa/searchlib/common/bitvector.h> #include <vespa/searchlib/common/tunefileinfo.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/stllike/allocator.h> -#include "bitvectoridxfile.h" + +class Fast_BufferedFile; namespace search::diskindex { @@ -16,7 +17,7 @@ class BitVectorFileWrite : public BitVectorIdxFileWrite private: using Parent = BitVectorIdxFileWrite; - Fast_BufferedFile *_datFile; + std::unique_ptr<Fast_BufferedFile> _datFile; public: private: @@ -32,13 +33,13 @@ public: void open(const vespalib::string &name, uint32_t docIdLimit, const TuneFileSeqWrite &tuneFileWrite, - const common::FileHeaderContext &fileHeaderContext); + const common::FileHeaderContext &fileHeaderContext) override; void addWordSingle(uint64_t wordNum, const BitVector &bitVector); - void flush(); - void sync(); - void close(); + void flush() override; + void sync() override; + void close() override; void makeDatHeader(const common::FileHeaderContext &fileHeaderContext); void updateDatHeader(uint64_t fileBitSize); }; diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.cpp b/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.cpp index 17ad4c5b846..e87238bef2d 100644 --- a/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.cpp @@ -1,12 +1,12 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "bitvectoridxfile.h" -#include <vespa/searchlib/common/bitvector.h> #include <vespa/searchlib/common/fileheadercontext.h> #include <vespa/searchlib/index/bitvectorkeys.h> #include <vespa/searchlib/util/file_settings.h> #include <vespa/vespalib/data/fileheader.h> #include <vespa/vespalib/util/size_literals.h> +#include <vespa/fastlib/io/bufferedfile.h> #include <cassert> namespace search::diskindex { @@ -115,13 +115,13 @@ BitVectorIdxFileWrite::updateIdxHeader(uint64_t fileBitSize) if (_scope != BitVectorKeyScope::SHARED_WORDS) { h.putTag(Tag("fileBitSize", fileBitSize)); } - _idxFile->Flush(); - _idxFile->Sync(); + bool sync_ok = _idxFile->Sync(); + assert(sync_ok); assert(h.getSize() == _idxHeaderLen); _idxFile->SetPosition(0); h.writeFile(*_idxFile); - _idxFile->Flush(); - _idxFile->Sync(); + sync_ok = _idxFile->Sync(); + assert(sync_ok); } void @@ -147,7 +147,8 @@ BitVectorIdxFileWrite::flush() void BitVectorIdxFileWrite::syncCommon() { - _idxFile->Sync(); + bool sync_ok = _idxFile->Sync(); + assert(sync_ok); } void @@ -166,7 +167,8 @@ BitVectorIdxFileWrite::close() assert(pos == idxSize()); _idxFile->alignEndForDirectIO(); updateIdxHeader(pos * 8); - _idxFile->Close(); + bool close_ok = _idxFile->Close(); + assert(close_ok); } _idxFile.reset(); } diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.h b/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.h index a5b6226fd43..f814cd20f5a 100644 --- a/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.h +++ b/searchlib/src/vespa/searchlib/diskindex/bitvectoridxfile.h @@ -2,12 +2,13 @@ #pragma once -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/common/bitvector.h> #include <vespa/searchlib/common/tunefileinfo.h> #include <vespa/vespalib/stllike/string.h> #include "bitvectorkeyscope.h" +class Fast_BufferedFile; + namespace search::common { class FileHeaderContext; } namespace search::diskindex { @@ -35,18 +36,18 @@ public: BitVectorIdxFileWrite& operator=(const BitVectorIdxFileWrite &&) = delete; BitVectorIdxFileWrite(BitVectorKeyScope scope); - ~BitVectorIdxFileWrite(); + virtual ~BitVectorIdxFileWrite(); - void open(const vespalib::string &name, uint32_t docIdLimit, - const TuneFileSeqWrite &tuneFileWrite, - const common::FileHeaderContext &fileHeaderContext); + virtual void open(const vespalib::string &name, uint32_t docIdLimit, + const TuneFileSeqWrite &tuneFileWrite, + const common::FileHeaderContext &fileHeaderContext); void addWordSingle(uint64_t wordNum, uint32_t numDocs); - void flush(); - void sync(); - void close(); + virtual void flush(); + virtual void sync(); + virtual void close(); static uint32_t getBitVectorLimit(uint32_t docIdLimit) { // Must match FastS_BinSizeParams::CalcMaxBinSize() diff --git a/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.cpp b/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.cpp index a3b9259a278..7bc1bdbfb9b 100644 --- a/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.cpp @@ -3,6 +3,7 @@ #include "dictionarywordreader.h" #include <vespa/searchlib/index/schemautil.h> #include <vespa/vespalib/util/error.h> +#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/log/log.h> LOG_SETUP(".diskindex.dictionarywordreader"); @@ -43,21 +44,27 @@ DictionaryWordReader::open(const vespalib::string & dictionaryName, _old2newwordfile->EnableDirectIO(); } // no checking possible - _old2newwordfile->WriteOpen(wordMapName.c_str()); + _old2newwordfile->OpenWriteOnly(wordMapName.c_str()); _old2newwordfile->SetSize(0); return true; } void +DictionaryWordReader::writeNewWordNum(uint64_t newWordNum) { + _old2newwordfile->WriteBuf(&newWordNum, sizeof(newWordNum)); +} + +void DictionaryWordReader::close() { if (!_dictFile->close()) { LOG(error, "Error closing input dictionary"); } - _old2newwordfile->Flush(); - _old2newwordfile->Sync(); - _old2newwordfile->Close(); + bool sync_ok = _old2newwordfile->Sync(); + assert(sync_ok); + bool close_ok = _old2newwordfile->Close(); + assert(close_ok); } } diff --git a/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.h b/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.h index 18e886ca22e..5c5dc60f4e7 100644 --- a/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.h +++ b/searchlib/src/vespa/searchlib/diskindex/dictionarywordreader.h @@ -2,7 +2,7 @@ #pragma once #include "pagedict4file.h" -#include <vespa/fastlib/io/bufferedfile.h> + namespace search::diskindex { @@ -47,7 +47,7 @@ public: private: // "owners" of file handles. - std::unique_ptr<Fast_BufferedFile> _old2newwordfile; + std::unique_ptr<FastOS_FileInterface> _old2newwordfile; using DictionaryFileSeqRead = index::DictionaryFileSeqRead; std::unique_ptr<DictionaryFileSeqRead> _dictFile; @@ -82,9 +82,7 @@ public: void close(); - void writeNewWordNum(uint64_t newWordNum) { - _old2newwordfile->WriteBuf(&newWordNum, sizeof(newWordNum)); - } + void writeNewWordNum(uint64_t newWordNum); void write(WordAggregator &writer) { writer.tryWriteWord(_word); diff --git a/searchlib/src/vespa/searchlib/diskindex/zcposting.h b/searchlib/src/vespa/searchlib/diskindex/zcposting.h index dc23fe5b37e..3d7dee1a988 100644 --- a/searchlib/src/vespa/searchlib/diskindex/zcposting.h +++ b/searchlib/src/vespa/searchlib/diskindex/zcposting.h @@ -42,8 +42,6 @@ public: bool close() override; void getParams(PostingListParams ¶ms) override; void getFeatureParams(PostingListParams ¶ms) override; - void readWordStartWithSkip(); - void readWordStart(); void readHeader(); static const vespalib::string &getIdentifier(bool dynamic_k); }; diff --git a/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt b/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt index 9a35e4a2b05..ae34cdd66c8 100644 --- a/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt +++ b/searchlib/src/vespa/searchlib/tensor/CMakeLists.txt @@ -3,6 +3,7 @@ vespa_add_library(searchlib_tensor OBJECT SOURCES angular_distance.cpp bitvector_visited_tracker.cpp + blob_sequence_reader.cpp default_nearest_neighbor_index_factory.cpp dense_tensor_attribute.cpp dense_tensor_attribute_saver.cpp diff --git a/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.cpp b/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.cpp new file mode 100644 index 00000000000..0d86af2f3a5 --- /dev/null +++ b/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.cpp @@ -0,0 +1,13 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "blob_sequence_reader.h" +#include <vespa/fastos/file.h> + +namespace search::tensor { + +void +BlobSequenceReader::readBlob(void *buf, size_t len) { + _datFile.file().ReadBuf(buf, len); +} + +} // namespace diff --git a/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.h b/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.h index 5b7efc73a02..45fcf5524d2 100644 --- a/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.h +++ b/searchlib/src/vespa/searchlib/tensor/blob_sequence_reader.h @@ -1,8 +1,8 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastlib/io/bufferedfile.h> +#pragma once + #include <vespa/searchlib/attribute/readerbase.h> -#include <vespa/searchlib/util/fileutil.h> namespace search::tensor { @@ -20,7 +20,7 @@ public: _sizeReader(_datFile.file()) { } uint32_t getNextSize() { return _sizeReader.readHostOrder(); } - void readBlob(void *buf, size_t len) { _datFile.file().ReadBuf(buf, len); } + void readBlob(void *buf, size_t len); }; } // namespace diff --git a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp index 0cb23fe2ae9..0ae55a670da 100644 --- a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp @@ -5,7 +5,6 @@ #include <vespa/eval/eval/fast_value.h> #include <vespa/eval/eval/value.h> -#include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/attribute/readerbase.h> #include <vespa/searchlib/util/fileutil.h> #include <vespa/vespalib/util/array.h> diff --git a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp index 16d9f2e3bbd..a0ec04b98cb 100644 --- a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp @@ -3,10 +3,7 @@ #include "serialized_fast_value_attribute.h" #include "streamed_value_saver.h" #include <vespa/eval/eval/value.h> -#include <vespa/eval/eval/fast_value.h> #include <vespa/fastlib/io/bufferedfile.h> -#include <vespa/searchlib/attribute/readerbase.h> -#include <vespa/searchlib/util/fileutil.h> #include <vespa/vespalib/util/rcuvector.hpp> #include <vespa/log/log.h> diff --git a/searchlib/src/vespa/searchlib/util/fileutil.cpp b/searchlib/src/vespa/searchlib/util/fileutil.cpp index 83f3fe3a5fa..e85e792f492 100644 --- a/searchlib/src/vespa/searchlib/util/fileutil.cpp +++ b/searchlib/src/vespa/searchlib/util/fileutil.cpp @@ -4,6 +4,7 @@ #include "filesizecalculator.h" #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/guard.h> +#include <vespa/fastlib/io/bufferedfile.h> #include <fcntl.h> #include <sys/mman.h> #include <sys/stat.h> diff --git a/searchlib/src/vespa/searchlib/util/fileutil.h b/searchlib/src/vespa/searchlib/util/fileutil.h index 74096d8b5dd..8271265aa33 100644 --- a/searchlib/src/vespa/searchlib/util/fileutil.h +++ b/searchlib/src/vespa/searchlib/util/fileutil.h @@ -8,7 +8,6 @@ #include <vespa/vespalib/stllike/string.h> using vespalib::GenericHeader; -class Fast_BufferedFile; namespace search { diff --git a/searchlib/src/vespa/searchlib/util/fileutil.hpp b/searchlib/src/vespa/searchlib/util/fileutil.hpp index 98e54581ac7..5b5303ef169 100644 --- a/searchlib/src/vespa/searchlib/util/fileutil.hpp +++ b/searchlib/src/vespa/searchlib/util/fileutil.hpp @@ -2,7 +2,6 @@ #pragma once #include "fileutil.h" -#include <vespa/fastlib/io/bufferedfile.h> namespace search { |