[
https://issues.apache.org/jira/browse/HBASE-20095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383243#comment-16383243
]
Reid Chan edited comment on HBASE-20095 at 3/2/18 7:57 AM:
-----------------------------------------------------------
Only one updates the static pool.
Because all registered {{ConfigurationObserver}} are called sequentially, let's
say {{LogCleaner}} is called first, then {{poolSize}} is updated; following
{{HFileCleaner}} which should see the latest {{poolSize}} and should not
reconfigure the pool and just return. The snippet,
{code:java}
public void onConfigurationChange(Configuration conf) {
int updatedSize = calculatePoolSize(conf.get(CHORE_POOL_SIZE,
DEFAULT_CHORE_POOL_SIZE));
if (updatedSize == poolSize) {
LOG.trace("Size from configuration is same as previous={}, no need to
update.", updatedSize);
return;
}
poolSize = updatedSize;
...
}
{code}
was (Author: reidchan):
Only one updates the static pool.
Because all registered {{ConfigurationObserver}} are called sequentially, let's
say {{LogCleaner}} is called first, then size of pool {{poolSize}} is updated;
following {{HFileCleaner}} which should see the latest {{updatedSize}} and
should not reconfigure the pool and just return. The snippet,
{code:java}
public void onConfigurationChange(Configuration conf) {
int updatedSize = calculatePoolSize(conf.get(CHORE_POOL_SIZE,
DEFAULT_CHORE_POOL_SIZE));
if (updatedSize == poolSize) {
LOG.trace("Size from configuration is same as previous={}, no need to
update.", updatedSize);
return;
}
poolSize = updatedSize;
...
}
{code}
> Redesign single instance pool in CleanerChore
> ---------------------------------------------
>
> Key: HBASE-20095
> URL: https://issues.apache.org/jira/browse/HBASE-20095
> Project: HBase
> Issue Type: Improvement
> Reporter: Reid Chan
> Assignee: Reid Chan
> Priority: Critical
> Attachments: HBASE-20095.master.001.patch,
> HBASE-20095.master.002.patch
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)