RequestSort() returns true if all child batches are sorted and false if sorting has been asynchronously scheduled.
()
| 877 | // RequestSort() returns true if all child batches are sorted and |
| 878 | // false if sorting has been asynchronously scheduled. |
| 879 | func (b *batch) RequestSort() bool { |
| 880 | if b == deletedChildBatchMarker { |
| 881 | return true |
| 882 | } |
| 883 | |
| 884 | // false because we must never wait for sorter else it can deadlock. |
| 885 | sorted := b.segment.RequestSort(false) |
| 886 | |
| 887 | for _, childBatch := range b.childBatches { |
| 888 | sorted = childBatch.RequestSort() && sorted |
| 889 | } |
| 890 | |
| 891 | return sorted |
| 892 | } |
| 893 | |
| 894 | func (b *batch) doSort() { |
| 895 | if b == deletedChildBatchMarker { |
nothing calls this directly
no test coverage detected