code: private int popAndInsert() throws InterruptedException {
          //take() will wait if pq is temporarily empty
          Stats min = pq.take();
          if (LOG.isTraceEnabled()) {
              LOG.trace("picked forest# " + min.fIdx + " with "
                  + min.frmtCount + " docs");
          }
          min.frmtCount += batch;
          pq.offer(min);
          int idx = min.fIdx;
          frmtCount[idx] = min.frmtCount;
          return idx;
      }
docs: Most of the time, frmtCount increase by batch; instead of waiting the
  batch actually accumulated, we increment the batch in the priority. In
  this way, we merge two operations (peek and remove) into one operation
  (take). What's more, the take operation only takes O(1) time while the
  remove operation takes O(n) time, where n is # forests.
  
  The down-side is, if insertContentCollectErrors happens to collect
  errors, # of docs with errors is not excluded in the stats in the
  queue
  
  @return forest index
  @throws InterruptedException