Accumulo
  1. Accumulo
  2. ACCUMULO-1505

MockTable's addMutation does not check for empty mutation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.3
    • Fix Version/s: 1.4.4, 1.5.1, 1.6.0
    • Component/s: client
    • Labels:
      None

      Description

      When calling addMutation or addMutations on a MockBatchWriter, the updates stored in the mutation are iterated over then committed in the MockTable class.

      When this occurs in the TabletServerBatchWriter (eventually called from the BatchWriterImpl), however, the mutation size is first checked and if the mutation size is 0, an IllegalArgumentException is thrown.

      In practice, if you have code that tries to submit an empty mutation to a BatchWriter, it will fail and throw an exception in the real world, but this will not be caught in tests against MockAccumulo.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        2h 15m 1 Ryan Leary 11/Jun/13 19:43
        Patch Available Patch Available Resolved Resolved
        36m 1 John Vines 11/Jun/13 20:19
        John Vines made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        John Vines added a comment -

        Looks good. I went ahead and applied it to 1.4.4, 1.5.1, and 1.6.0. There was a typing warning from the use of Collection.EMPTY_LIST that I fixed. Additionally, updated it to use the new APIs for 1.5.0+.

        I also added you as a contributor, Ryan. Thanks again!

        Show
        John Vines added a comment - Looks good. I went ahead and applied it to 1.4.4, 1.5.1, and 1.6.0. There was a typing warning from the use of Collection.EMPTY_LIST that I fixed. Additionally, updated it to use the new APIs for 1.5.0+. I also added you as a contributor, Ryan. Thanks again!
        Hide
        ASF subversion and git services added a comment -

        Commit 1491912 from John Vines
        [ https://svn.apache.org/r1491912 ]

        ACCUMULO-1505 - Ryan Leary's patch with updates/warning busting

        Show
        ASF subversion and git services added a comment - Commit 1491912 from John Vines [ https://svn.apache.org/r1491912 ] ACCUMULO-1505 - Ryan Leary's patch with updates/warning busting
        Hide
        ASF subversion and git services added a comment -

        Commit 1491911 from John Vines
        [ https://svn.apache.org/r1491911 ]

        ACCUMULO-1505 - merging Ryan Leary's patch, with modifications to update and remove warnings

        Show
        ASF subversion and git services added a comment - Commit 1491911 from John Vines [ https://svn.apache.org/r1491911 ] ACCUMULO-1505 - merging Ryan Leary's patch, with modifications to update and remove warnings
        Hide
        ASF subversion and git services added a comment -

        Commit 1491910 from John Vines
        [ https://svn.apache.org/r1491910 ]

        ACCUMULO-1505 - fixing up some warnings in the patch

        Show
        ASF subversion and git services added a comment - Commit 1491910 from John Vines [ https://svn.apache.org/r1491910 ] ACCUMULO-1505 - fixing up some warnings in the patch
        Hide
        ASF subversion and git services added a comment -

        Commit 1491900 from John Vines
        [ https://svn.apache.org/r1491900 ]

        ACCUMULO-1505 - Applying Ryan Leary's patch

        Show
        ASF subversion and git services added a comment - Commit 1491900 from John Vines [ https://svn.apache.org/r1491900 ] ACCUMULO-1505 - Applying Ryan Leary's patch
        John Vines made changes -
        Assignee Ryan Leary [ ryanleary ]
        Ryan Leary made changes -
        Attachment accumulo1505.patch [ 12587269 ]
        Ryan Leary made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Ryan Leary added a comment -

        Added fixes to check for null mutation/mutation iterables as well as empty mutations. Adds unit test for these cases.

        Show
        Ryan Leary added a comment - Added fixes to check for null mutation/mutation iterables as well as empty mutations. Adds unit test for these cases.
        John Vines made changes -
        Field Original Value New Value
        Fix Version/s 1.5.1 [ 12324399 ]
        Fix Version/s 1.6.0 [ 12322468 ]
        Ryan Leary created issue -

          People

          • Assignee:
            Ryan Leary
            Reporter:
            Ryan Leary
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development