Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 2.0.0
    • 1.0.0, 1.1.0
    • None
    • None
    • Reviewed

    Description

      It looks like there are a lot of places where flushCommits() are called on tables that do not have autoFlush turned on. That might be a legacy concern from pre-autoFlush days. HBASE-12728 will likely result in removing the flushCommits() method from Table. The patch for this issue should remove all unnecessary calls to flushCommit() to prepare for the full fix.

      flushCommits() are only necessary after a setAutoFlushTo(false) is called. Here's the relevant code from HTable.java:

      HTable.java
        @Override
        public void put(final Put put)
            throws InterruptedIOException, RetriesExhaustedWithDetailsException {
          doPut(put);
          if (autoFlush) {
            flushCommits();
          }
        }
      
        /**
         * {@inheritDoc}
         */
        @Override
        public void put(final List<Put> puts)
            throws InterruptedIOException, RetriesExhaustedWithDetailsException {
          for (Put put : puts) {
            doPut(put);
          }
          if (autoFlush) {
            flushCommits();
          }
        }
      

      Puts have implicit flushCommits() calls when autoFlush is true. Deletes are not affected by autoFlush() and are not directly impacted by flushCommits() since deletes are not added to the writeAysncBuffer.

      Attachments

        1. HBASE-12802B.patch
          105 kB
          Solomon Duskis
        2. HBASE-12802.patch
          105 kB
          Solomon Duskis
        3. 12802-1.0.patch
          105 kB
          Ted Yu

        Issue Links

          Activity

            People

              sduskis Solomon Duskis
              sduskis Solomon Duskis
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: