[jira] [Commented] (CASSANDRA-9909) Configuration is loaded too often during runtime
[ https://issues.apache.org/jira/browse/CASSANDRA-9909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16076327#comment-16076327 ] Sylvain Lebresne commented on CASSANDRA-9909: - bq. For proposal #3, you assume the seeds are being written out to a file, which is not always the case Pretty sure proposal #3 suggested to modify the reloading of the config within {{SimpleSeedProvider}} (to, say, replace the call to {{loadConfig}} by a way to reload the config only if it's not up-to-date and use that), so that wouldn't affect other seed provider in the least and is imo a perfectly valid option. In fact, I'd argue it's probably better than proposal #2. > Configuration is loaded too often during runtime > > > Key: CASSANDRA-9909 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9909 > Project: Cassandra > Issue Type: Improvement >Reporter: Robert Stupp >Priority: Minor > > Each call to {{SimpleSeedProvider.getSeeds()}} via > {{DatabaseDescriptor.getSeeds()}} loads the configuration file from disk. > This is unnecessary in the vast majority of calls from {{Gossiper}} and > {{StorageService}}. > Proposal: > * Instantiate {{ConfigurationLoader}} once during init of DD (not every time > in {{loadConfig()}}} > * Only load configuration once per time interval > * Only load configuration if config file has changed (file modification > timestamp) - if applicable (URL resolves to a file) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-9909) Configuration is loaded too often during runtime
[ https://issues.apache.org/jira/browse/CASSANDRA-9909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644785#comment-14644785 ] Jason Brown commented on CASSANDRA-9909: The reason why we reload the seeds is that the nodes can be dynamic - think ec2, where nodes can come and go. So, proposal #1 is no good (a list that does not change during the lifetime of the process). For proposal #3, you assume the seeds are being written out to a file, which is not always the case (netflix's Priam app provides an implementation of SeedProvider that calls over to Priam via http on localhost, which keeps a cached notion of the seeds for that node). Thus, proposal #2 is probably the best. All this being said, DD.getSeeds() is called incredibly infrequently; in fact, almost never. If you want to add a timer background task to reload the seeds from the SeedProvider, I suspect you will actually end up doing more work. Configuration is loaded too often during runtime Key: CASSANDRA-9909 URL: https://issues.apache.org/jira/browse/CASSANDRA-9909 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Priority: Minor Each call to {{SimpleSeedProvider.getSeeds()}} via {{DatabaseDescriptor.getSeeds()}} loads the configuration file from disk. This is unnecessary in the vast majority of calls from {{Gossiper}} and {{StorageService}}. Proposal: * Instantiate {{ConfigurationLoader}} once during init of DD (not every time in {{loadConfig()}}} * Only load configuration once per time interval * Only load configuration if config file has changed (file modification timestamp) - if applicable (URL resolves to a file) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9909) Configuration is loaded too often during runtime
[ https://issues.apache.org/jira/browse/CASSANDRA-9909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644930#comment-14644930 ] Brandon Williams commented on CASSANDRA-9909: - bq. All this being said, DD.getSeeds() is called incredibly infrequently; in fact, almost never. I agree, only maybe once in OTC, when bootstrapping, or on removal of a seed node. Configuration is loaded too often during runtime Key: CASSANDRA-9909 URL: https://issues.apache.org/jira/browse/CASSANDRA-9909 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Priority: Minor Each call to {{SimpleSeedProvider.getSeeds()}} via {{DatabaseDescriptor.getSeeds()}} loads the configuration file from disk. This is unnecessary in the vast majority of calls from {{Gossiper}} and {{StorageService}}. Proposal: * Instantiate {{ConfigurationLoader}} once during init of DD (not every time in {{loadConfig()}}} * Only load configuration once per time interval * Only load configuration if config file has changed (file modification timestamp) - if applicable (URL resolves to a file) -- This message was sent by Atlassian JIRA (v6.3.4#6332)