You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nihal Jain (JIRA)" <ji...@apache.org> on 2018/06/07 12:09:00 UTC

[jira] [Commented] (HBASE-20699) QuataCache should cancel the QuotaRefresherChore service inside its stop()

    [ https://issues.apache.org/jira/browse/HBASE-20699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16504580#comment-16504580 ] 

Nihal Jain commented on HBASE-20699:
------------------------------------

*SOLUTION*
 Cancel the refreshChore service as below

{{QuotaCache}} should cancel refreshChore inside {{QuotaCache.stop()}}:
{code:java}
  @Override
  public void stop(final String why) {
    if (refreshChore != null) {
      LOG.info("Stopping QuotaRefresherChore chore.");
      refreshChore.cancel(true);
    }
    stopped = true;
  }
{code}

> QuataCache should cancel the QuotaRefresherChore service inside its stop()
> --------------------------------------------------------------------------
>
>                 Key: HBASE-20699
>                 URL: https://issues.apache.org/jira/browse/HBASE-20699
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Major
>
> *ANALYSIS*
>  * Called from {{HRegionServer.run()}} in case a rs is aborted:
> {code:java}
>     // Stop the quota manager
>     if (rsQuotaManager != null) {
>       rsQuotaManager.stop();
>     }
> {code}
>  * Inside {{RegionServerRpcQuotaManager.stop()}}:
> {code:java}
>   public void stop() {
>     if (isQuotaEnabled()) {
>       quotaCache.stop("shutdown");
>     }
>   }
> {code}
>  * {{QuotaCache starts QuotaRefresherChore in}}{{ QuotaCache.start()}}:
> {code:java}
>   public void start() throws IOException {
>     stopped = false;
>     // TODO: This will be replaced once we have the notification bus ready.
>     Configuration conf = rsServices.getConfiguration();
>     int period = conf.getInt(REFRESH_CONF_KEY, REFRESH_DEFAULT_PERIOD);
>     refreshChore = new QuotaRefresherChore(period, this);
>     rsServices.getChoreService().scheduleChore(refreshChore);
>   }
> {code}
>  * {{QuotaCache does not cancel refreshChore inside }}{{QuotaCache.stop()}}:
> {code:java}
>   @Override
>   public void stop(final String why) {
>     stopped = true;
>   }
> {code}
> *IMPACT:*
>  QuotaRefresherChore may cause some retrying operation to delay rs abort



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)