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

[VisibilityController] Apply MAX_VERSIONS from schema or request when scanning

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.98.0
    • 0.99.0, 0.98.2
    • security
    • None
    • Reviewed

    Description

      If we update the row multiple times with different visibility labels
      we are able to get the "old version" of the row until is flushed

      $ sudo -u hbase hbase shell
      hbase> add_labels 'A'
      hbase> add_labels 'B'
      hbase> create 'tb', 'f1'
      hbase> put 'tb', 'row', 'f1:q', 'v1', {VISIBILITY=>'A'}
      hbase> put 'tb', 'row', 'f1:q', 'v1all'
      hbase> put 'tb', 'row', 'f1:q', 'v1aOrB', {VISIBILITY=>'A|B'}
      hbase> put 'tb', 'row', 'f1:q', 'v1aAndB', {VISIBILITY=>'A&B'}
      hbase> scan 'tb'
      row column=f1:q, timestamp=1395948168154, value=v1aAndB
      1 row
      
      $ sudo -u testuser hbase shell
      hbase> scan 'tb'
      row column=f1:q, timestamp=1395948168102, value=v1all
      1 row
      

      When we flush the memstore we get a single row (the last one inserted)
      so the testuser get 0 rows now.

      $ sudo -u hbase hbase shell
      hbase> flush 'tb'
      hbase> scan 'tb'
      row column=f1:q, timestamp=1395948168154, value=v1aAndB
      1 row
      
      $ sudo -u testuser hbase shell
      hbase> scan 'tb'
      0 row
      

      Attachments

        1. HBASE-10854.patch
          12 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            mbertozzi Matteo Bertozzi
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: