Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18847

Remove unneeded synchronized block from hfilev2 warning in branch-1.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6
    • 1.2.7
    • Performance
    • None
    • Reviewed

    Description

      The below code block starts at line 277 of HFileWriterV2.java. Class-level synchronization in a heavily used code path has a demonstrably significant negative effect on performance. I tested forcing a major compaction with 18 compaction threads per node; removing the synchronization resulted in an order of magnitude performance increase, with the bottleneck then being at the disks (where I want it to be).

          synchronized (HFileWriterV2.class) {
            if (WARN_CELL_WITH_TAGS && getFileContext().isIncludesTags()) {
              LOG.warn("A minimum HFile version of " + HFile.MIN_FORMAT_VERSION_WITH_TAGS
                + " is required to support cell attributes/tags. Consider setting "
                + HFile.FORMAT_VERSION_KEY + " accordingly.");
              WARN_CELL_WITH_TAGS = false;
            }
          }
      

      Attachments

        Issue Links

          Activity

            People

              richhowarth Rich Howarth
              richhowarth Rich Howarth
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: