HBase
  1. HBase
  2. HBASE-10854

[VisibilityController] Apply MAX_VERSIONS from schema or request when scanning

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.98.0
    • Fix Version/s: 0.99.0, 0.98.2
    • Component/s: security
    • Labels:
      None
    • Hadoop Flags:
      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
      
      1. HBASE-10854.patch
        12 kB
        Anoop Sam John

        Activity

        Matteo Bertozzi created issue -
        Matteo Bertozzi made changes -
        Field Original Value New Value
        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
        {code}
        $ 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 hbase hbase shell
        hbase> scan 'tb'
        row column=f1:q, timestamp=1395948168102, value=v1all
        1 row
        {code}

        When we flush the memstore we get a single row (the last one inserted)
        so the testuser get 0 rows now.
        {code}
        $ sudo -u hbase hbase shell
        hbase> flush 'tb'
        hbase> scan 'tb'
        row column=f1:q, timestamp=1395948168154, value=v1aAndB
        1 row

        $ sudo -u hbase hbase shell
        hbase> scan 'tb'
        0 row
        {code}
        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
        {code}
        $ 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
        {code}

        When we flush the memstore we get a single row (the last one inserted)
        so the testuser get 0 rows now.
        {code}
        $ 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
        {code}
        Anoop Sam John made changes -
        Affects Version/s 0.98.0 [ 12323143 ]
        Affects Version/s 0.98.1 [ 12325664 ]
        Anoop Sam John made changes -
        Assignee Anoop Sam John [ anoop.hbase ]
        Anoop Sam John made changes -
        Attachment HBASE-10854.patch [ 12638429 ]
        Anoop Sam John made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 0.99.0 [ 12325675 ]
        Fix Version/s 0.98.2 [ 12326505 ]
        Andrew Purtell made changes -
        Summary Multiple Row/VisibilityLabels visible while in the memstore [VisibilityController] Apply MAX_VERSIONS from schema or request when scanning
        Anoop Sam John made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.98.1 [ 12325664 ]
        Fix Version/s 0.98.2 [ 12326505 ]
        Resolution Fixed [ 1 ]
        Anoop Sam John made changes -
        Fix Version/s 0.98.2 [ 12326505 ]
        Fix Version/s 0.98.1 [ 12325664 ]
        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Anoop Sam John
            Reporter:
            Matteo Bertozzi
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development