diff options
author | Sviatlana Zuiko <sviatlana.zuiko@mongodb.com> | 2022-06-30 19:32:15 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-30 22:33:22 +0000 |
commit | ff5ce6771bd53616ed644ee794ba69c2fe6d91c3 (patch) | |
tree | d5d6b4ff5490b44085446dd5c0289dd2924ab656 /src/mongo/db/sorter | |
parent | 17f49ab8b16a6f45371771d8c152cfbf4ed186af (diff) | |
download | mongo-ff5ce6771bd53616ed644ee794ba69c2fe6d91c3.tar.gz |
Revert "SERVER-65481 Bulk shredding and loading for column store indexes"
This reverts commit cb9472afc30d32d1c18691d64899c1aa72cdc43d.
Diffstat (limited to 'src/mongo/db/sorter')
-rw-r--r-- | src/mongo/db/sorter/sorter.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/sorter/sorter.h | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp index ecb9e10118e..c23c2695afd 100644 --- a/src/mongo/db/sorter/sorter.cpp +++ b/src/mongo/db/sorter/sorter.cpp @@ -1291,11 +1291,11 @@ void SortedFileWriter<Key, Value>::addAlreadySorted(const Key& key, const Value& addDataToChecksum(_buffer.buf() + _nextObjPos, _buffer.len() - _nextObjPos, _checksum); if (_buffer.len() > static_cast<int>(kSortedFileBufferSize)) - writeChunk(); + spill(); } template <typename Key, typename Value> -void SortedFileWriter<Key, Value>::writeChunk() { +void SortedFileWriter<Key, Value>::spill() { int32_t size = _buffer.len(); char* outBuffer = _buffer.buf(); @@ -1340,7 +1340,7 @@ void SortedFileWriter<Key, Value>::writeChunk() { template <typename Key, typename Value> SortIteratorInterface<Key, Value>* SortedFileWriter<Key, Value>::done() { - writeChunk(); + spill(); return new sorter::FileIterator<Key, Value>( _file, _fileStartOffset, _file->currentOffset(), _settings, _dbName, _checksum); diff --git a/src/mongo/db/sorter/sorter.h b/src/mongo/db/sorter/sorter.h index 85c0f279ac2..12bccee1178 100644 --- a/src/mongo/db/sorter/sorter.h +++ b/src/mongo/db/sorter/sorter.h @@ -592,23 +592,16 @@ public: void addAlreadySorted(const Key&, const Value&); /** - * Writes any data remaining in the buffer to disk and then closes the file to which data was + * Spills any data remaining in the buffer to disk and then closes the file to which data was * written. * * No more data can be added via addAlreadySorted() after calling done(). */ Iterator* done(); - /** - * The SortedFileWriter organizes data into chunks, with a chunk getting written to the output - * file when it exceends a maximum chunks size. A SortedFilerWriter client can produce a short - * chunk by manually calling this function. - * - * If no new data has been added since the last chunk was written, this function is a no-op. - */ - void writeChunk(); - private: + void spill(); + const Settings _settings; std::shared_ptr<typename Sorter<Key, Value>::File> _file; BufBuilder _buffer; |