public WriteEntry begin(Runnable action) {
    synchronized (writeQueue) {
      long nextWriteNumber = writePoint.incrementAndGet();
      WriteEntry e = new WriteEntry(nextWriteNumber);
      writeQueue.add(e);
      action.run();
      return e;
    }
  }
Start a write transaction. Create a new {@link WriteEntry} with a new write number and add it
to our queue of ongoing writes. Return this WriteEntry instance. To complete the write
transaction and wait for it to be visible, call {@link #completeAndWait(WriteEntry)}. If the
write failed, call {@link #complete(WriteEntry)} so we can clean up AFTER removing ALL trace of
the failed write transaction.
<p>
The {@code action} will be executed under the lock which means it can keep the same order with
mvcc.
@see #complete(WriteEntry)
@see #completeAndWait(WriteEntry)
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiVersionConcurrencyControl.java