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

Bug in calls to RegionObsever.postScannerFilterRow

    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      This fix breaks src compatibility. If users try recompiling their CP impl with new HBase jar, they MAY have to change. (If they have overridden this method)
      This does not break binary compatibility
      Show
      This fix breaks src compatibility. If users try recompiling their CP impl with new HBase jar, they MAY have to change. (If they have overridden this method) This does not break binary compatibility

    Description

      Just noticed that while looking at HBASE-10047.
      In 0.94 (and presumably in trunk, will check later) we have this:

          protected boolean nextRow(byte [] currentRow, int offset, short length) throws IOException {
           ...
            if (this.region.getCoprocessorHost() != null) {
              return this.region.getCoprocessorHost().postScannerFilterRow(this, currentRow);
            }
            return true;
          }
      

      Notice how we only pass currentRow into the coprocessor, but not offset and length. Anything using this hook currently is 100% broken. The hook was added in 0.94.5 (HBASE-5664), it never worked correctly.

      anoopsamjohn, you had added the hook. Do you still need it?

      We can either remove it (I'd prefer that in the light of the performance issued observed in HBASE-10047, we can leave the stub in BaseRegionObserver in 0.94, but document that it is no-op), or we'd have to have change its signature to be able to pass offset and length as well.

      Since nobody noticed nobody is using this hook currently, so both should be valid options.

      (Making a new standalone copy of the rowkey just to pass into this method absolutely out of the question for performance reasons).

      Attachments

        1. 10225-0.96.txt
          4 kB
          Lars Hofhansl
        2. HBASE-10225.patch
          5 kB
          Anoop Sam John
        3. 10225-0.94.txt
          4 kB
          Lars Hofhansl

        Activity

          People

            anoop.hbase Anoop Sam John
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: