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

HRegion preClose hook is getting called multiple times for single close

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.3.0, 1.2.1, 1.1.4, 0.98.19, 2.0.0
    • 3.0.0-beta-2
    • Coprocessors
    • None

    Description

      1) HRegionServer#closeRegion(final RpcController controller,
      final CloseRegionRequest request)

            // Can be null if we're calling close on a region that's not online
            final HRegion region = this.getFromOnlineRegions(encodedRegionName);
            if ((region  != null) && (region .getCoprocessorHost() != null)) {
              region.getCoprocessorHost().preClose(false);
            }
      

      2) HRegionServer#closeRegion(String encodedName, final boolean abort,
      final boolean zk, final int versionOfClosingNode, final ServerName sn)

          if ((actualRegion != null) && (actualRegion.getCoprocessorHost() != null)) {
            try {
              actualRegion.getCoprocessorHost().preClose(false);
            } catch (IOException exp) {
              LOG.warn("Unable to close region: the coprocessor launched an error ", exp);
              return false;
            }
          }
      

      3) HRegion# private List<StoreFile> doClose(
      final boolean abort, MonitoredTask status)

          if (coprocessorHost != null) {
            status.setStatus("Running coprocessor pre-close hooks");
            this.coprocessorHost.preClose(abort);
          }
      

      IMO 3rd one is enough and remaining two are not needed.

      Attachments

        1. HBASE-8075.v1-master.patch
          2 kB
          Stephen Yuan Jiang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rajesh23 rajeshbabu
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated: