This could yield batches more than the number of write threads. How do we deal with that case?