code: protected void doDelete(int n) throws CorruptIndexException, IOException {
          if (transientDeletions) {
              deletedDocs.add(n);
              modCount.incrementAndGet(); // doDelete won't be executed, so incrementing modCount
          } else {
              super.doDelete(n);
              modCount.incrementAndGet();
          }
      }
docs: {@inheritDoc}
  <br>
  Increments the modification count.