cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-bukhtoyarov <...@git.apache.org>
Subject [GitHub] cassandra pull request #273: Fix overflow of 32-bit integer during compactio...
Date Fri, 21 Sep 2018 19:10:50 GMT
Github user vladimir-bukhtoyarov commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/273#discussion_r219600047
  
    --- Diff: src/java/org/apache/cassandra/utils/streamhist/StreamingTombstoneHistogramBuilder.java
---
    @@ -595,12 +600,22 @@ private boolean tryCell(int cell, int point, int delta)
             }
         }
     
    -    private static int roundKey(int p, int roundSeconds)
    +    private static int roundKey(int point, int roundSeconds)
         {
    -        int d = p % roundSeconds;
    +        int d = point % roundSeconds;
             if (d > 0)
    -            return p + (roundSeconds - d);
    +        {
    +            point += roundSeconds - d;
    +            if (point == Cell.MAX_DELETION_TIME)
    --- End diff --
    
    Fixed. The new testcase "testThatPointIsNotMissedBecauseOfRoundingToNoDeletionTime" added
to cover this branch


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message