cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12998) Remove a silly hint.isLive() check in HintsService.write()
Date Wed, 07 Dec 2016 21:01:02 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-12998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15729907#comment-15729907
] 

Aleksey Yeschenko commented on CASSANDRA-12998:
-----------------------------------------------

Committed to 3.X and trunk only, as [7eac22dd41cb09e6d64fb5ac48b2cca3c8840cc8|https://github.com/apache/cassandra/commit/7eac22dd41cb09e6d64fb5ac48b2cca3c8840cc8],
without a CHANGES.txt entry as this is too trivial. Thanks.

> Remove a silly hint.isLive() check in HintsService.write()
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-12998
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12998
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local Write-Read Paths
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>            Priority: Trivial
>             Fix For: 3.12
>
>
> Somehow made it to the final version of the codebase, this can practically never return
false. The {{bufferPool.write()}} call should be unconditional.
> {code}
>     public void write(Iterable<UUID> hostIds, Hint hint)
>     {
>         if (isShutDown)
>             throw new IllegalStateException("HintsService is shut down and can't accept
new hints");
>         // we have to make sure that the HintsStore instances get properly initialized
- otherwise dispatch will not trigger
>         catalog.maybeLoadStores(hostIds);
>         if (hint.isLive())
>             bufferPool.write(hostIds, hint);
>         StorageMetrics.totalHints.inc(size(hostIds));
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message