[
https://issues.apache.org/jira/browse/CASSANDRA-17505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacek Lewandowski updated CASSANDRA-17505:
------------------------------------------
Description:
{{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
> 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]