| 122 | } // namespace mutation_log_reader |
| 123 | |
| 124 | ACTOR Future<Void> MutationLogReader::initializePQ(MutationLogReader* self) { |
| 125 | state int h; |
| 126 | for (h = 0; h < 256; ++h) { |
| 127 | try { |
| 128 | mutation_log_reader::RangeResultBlock front = waitNext(self->pipelinedReaders[h]->reads.getFuture()); |
| 129 | self->priorityQueue.push(front); |
| 130 | } catch (Error& e) { |
| 131 | if (e.code() != error_code_end_of_stream) { |
| 132 | throw e; |
| 133 | } |
| 134 | ++self->finished; |
| 135 | } |
| 136 | } |
| 137 | return Void(); |
| 138 | } |
| 139 | |
| 140 | Future<Standalone<RangeResultRef>> MutationLogReader::getNext() { |
| 141 | return getNext_impl(this); |