Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4338 Move to HBase-2.0
  3. PHOENIX-4467

Scans with filter returning all the versions

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0-alpha
    • None

    Description

      Even if we set max versions in the scan to 1, HBase is still returning all the versions if there is a filter.
      It seems to be a side-effect of HBASE-17125. where if INCLUDE_AND_NEXT_COL is the return code from the filter, we are not checking the version of the cell even though the documentation says.

      @InterfaceAudience.Public
        public enum ReturnCode {
          /**
           * Include the Cell
           */
          INCLUDE,
          /**
           * Include the Cell and seek to the next column skipping older versions.
           */
          INCLUDE_AND_NEXT_COL,
      
      }
      

      In UserScanQueryMatcher#mergeFilterResponse()

      case INCLUDE_AND_NEXT_COL:
              if (matchCode == MatchCode.INCLUDE) {
                matchCode = MatchCode.INCLUDE_AND_SEEK_NEXT_COL;
              }
              break;
       if (matchCode == MatchCode.INCLUDE_AND_SEEK_NEXT_COL
              || matchCode == MatchCode.INCLUDE_AND_SEEK_NEXT_ROW) {
            return matchCode;
          }
      
          // Now we will check versions again.
          if (curColCell == null || !CellUtil.matchingRowColumn(cell, curColCell)) {
            count = 0;
            curColCell = cell;
          }
          count += 1;
          return count > versionsAfterFilter ? MatchCode.SEEK_NEXT_COL : MatchCode.INCLUDE;
      

      Anoop Sam John, It could be a bug in HBase

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ankit@apache.org Ankit Singhal
            ankit@apache.org Ankit Singhal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment