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

HRegion preClose hook is getting called multiple times for single close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0, 1.2.1, 1.1.4, 0.98.19, 2.0.0
    • Fix Version/s: 3.0.0-alpha-1
    • Component/s: Coprocessors
    • Labels:
      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

              • Assignee:
                syuanjiang Stephen Yuan Jiang
                Reporter:
                rajesh23 rajeshbabu
              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: