You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tephra.apache.org by anwar6953 <gi...@git.apache.org> on 2017/06/21 01:21:34 UTC

[GitHub] incubator-tephra pull request #44: TEPHRA-235 Ensure that TransactionSnapsho...

GitHub user anwar6953 opened a pull request:

    https://github.com/apache/incubator-tephra/pull/44

    TEPHRA-235 Ensure that TransactionSnapshot always have a sorted invalid transaction list

    [TEPHRA-235](https://issues.apache.org/jira/browse/TEPHRA-235) Ensure that TransactionSnapshot always have a sorted invalid transaction list.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anwar6953/incubator-tephra bugfix_release/TEPHRA-235

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tephra/pull/44.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #44
    
----
commit 9d482be0aaf58b296931c440b393e59976c38eab
Author: Ali Anwar <an...@berkeley.edu>
Date:   2017-06-21T01:15:56Z

    TEPHRA-235 Ensure that TransactionSnapshot always have a sorted invalid transaction list.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #44: TEPHRA-235 Ensure that TransactionSnapsho...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-tephra/pull/44


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #44: TEPHRA-235 Ensure that TransactionSnapsho...

Posted by poornachandra <gi...@git.apache.org>.
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/44#discussion_r123363497
  
    --- Diff: tephra-core/src/test/java/org/apache/tephra/snapshot/SnapshotCodecTest.java ---
    @@ -375,4 +386,17 @@ private void assertTransactionVisibilityStateEquals(TransactionVisibilityState e
         Assert.assertEquals(expected.getInProgress(), input.getInProgress());
         Assert.assertEquals(expected.getInvalid(), input.getInvalid());
       }
    +
    +  private TransactionSnapshot assertSorted(TransactionSnapshot txSnapshot) {
    +    Collection<Long> invalidTxList = txSnapshot.getInvalid();
    +    if (invalidTxList.isEmpty()) {
    +      return txSnapshot;
    +    }
    +    Long previousLong = Iterables.get(invalidTxList, 0);
    +    for (Long aLong : invalidTxList) {
    +      Assert.assertTrue(aLong >= previousLong);
    --- End diff --
    
    Would be good to say sort error here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---