[
https://issues.apache.org/jira/browse/HBASE-26814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504256#comment-17504256
]
Duo Zhang commented on HBASE-26814:
-----------------------------------
This is not about concurrency. It is about writing to a static field in a
instance method. I think this is a bit confusing.
{code}
public void init(Configuration conf) {
this.parallelPutToStoreThreadLimit =
conf.getInt(PARALLEL_PUT_STORE_THREADS_LIMIT,
DEFAULT_PARALLEL_PUT_STORE_THREADS_LIMIT);
this.parallelPreparePutToStoreThreadLimit =
conf.getInt(PARALLEL_PREPARE_PUT_STORE_MULTIPLIER,
DEFAULT_PARALLEL_PREPARE_PUT_STORE_MULTIPLIER) *
parallelPutToStoreThreadLimit;
this.parallelPutToStoreThreadLimitCheckMinColumnCount =
conf.getInt(PARALLEL_PUT_STORE_THREADS_LIMIT_MIN_COLUMN_COUNT,
DEFAULT_PARALLEL_PUT_STORE_THREADS_LIMIT_MIN_COLUMN_NUM);
if (!isEnable() && !loggedDisableMessage) {
loggedDisableMessage = true; <========= This is static
LOG.info("StoreHotnessProtector is disabled. Set {} > 0 to enable, "
+ "which may help mitigate load under heavy write pressure.",
PARALLEL_PUT_STORE_THREADS_LIMIT);
}
}
{code}
If I call the init method on a StoreHotnessProtector which changes the
loggedDisableMessage, it will also effect other StoreHotnessProtector instances?
> Default StoreHotnessProtector to off, with logs to guide when to turn it on
> ---------------------------------------------------------------------------
>
> Key: HBASE-26814
> URL: https://issues.apache.org/jira/browse/HBASE-26814
> Project: HBase
> Issue Type: Improvement
> Reporter: Bryan Beaudreault
> Assignee: Bryan Beaudreault
> Priority: Major
> Fix For: 2.5.0, 2.6.0, 3.0.0-alpha-3
>
>
> As discussed in HBASE-26522 and somewhat in HBASE-26575,
> StoreHotnessProtector is too conservative. One can easily trigger
> RegionTooBusyException on an otherwise idle regionserver with relatively
> small amount of traffic. The idea behind this protection is good, but it
> needs to take into account current load in order to warrant being enabled by
> default.
> Until it's improved as such, we should change it to default off. One thing we
> can do to help drive usage would be to add warning logs when it would have
> triggered. Operators who are diagnosing performance issues will naturally
> look at the logs and see indication of a potential tool for mitigation.
> cc [[email protected]]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)