[
https://issues.apache.org/jira/browse/CASSANDRA-17505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515154#comment-17515154
]
Jacek Lewandowski commented on CASSANDRA-17505:
-----------------------------------------------
https://github.com/apache/cassandra/pull/1539
https://app.circleci.com/pipelines/github/jacek-lewandowski/cassandra/211/workflows/7a69cacd-01bd-4d26-9bd2-33ea07bc5210
> Do not call FBU.getXXXAddressAndPort in static initializers
> -----------------------------------------------------------
>
> Key: CASSANDRA-17505
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17505
> Project: Cassandra
> Issue Type: Bug
> Reporter: Jacek Lewandowski
> Assignee: Jacek Lewandowski
> Priority: Normal
>
> {{FBUtilities.getLocalAddressAndPort}} as well as
> {{FBUtilites.getBroadcastAddressAndPort}} may cache unexpected value when
> called before {{DatabaseDescriptor}} initialization. It may happen especially
> when the mentioned methods are used in static initializers of some classes
> where we have very little or no control over the time they get loaded.
> The current situation may result in weird flakiness, where we bind to some
> unexpected address and then, the nodes may not be able to connect.
> In the scope of this ticket, I'd do the following:
> 1. make {{DatabaseDescriptor.conf}} field {{volatile}}
> 2. refactor usages of the mentioned methods in static initializers of classes
> 3. forbid using those methods before {{DatabaseDescriptor}} is initialized by
> throwing assertion error
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]