[ 
https://issues.apache.org/jira/browse/CASSANDRA-20670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuqi Yan updated CASSANDRA-20670:
---------------------------------
     Bug Category: Parent values: Code(13163)Level 1 values: Bug - Unclear 
Impact(13164)
       Complexity: Low Hanging Fruit
      Component/s: Legacy/Core
    Discovered By: Unit Test
         Severity: Low
           Status: Open  (was: Triage Needed)

> IntrusiveStack.accumulate is not accumulating correctly
> -------------------------------------------------------
>
>                 Key: CASSANDRA-20670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20670
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Legacy/Core
>            Reporter: Yuqi Yan
>            Assignee: Yuqi Yan
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> protected static <T extends IntrusiveStack<T>> long accumulate(T list, 
> LongAccumulator<T> accumulator, long initialValue)
> {
>     long value = initialValue;
>     while (list != null)
>     {
>         value = accumulator.apply(list, initialValue);
>                                           ^^^
>         list = list.next;
>     }
>     return value;
> } {code}
> Seems we're restarting from the beginning every time when accumulating. This 
> is used in Paxos V2 when aggregating the responses from peers.
> Added a simple unit test around FailureRecordingCallback to reproduce this



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to