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:07:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Nihal Jain updated HBASE-20699:
-------------------------------
    Description: 
*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 stop should 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

  was:
*ANALYSIS*
 * Called from {{HRegionServer.run()}} in case an 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 stop should 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


> 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 stop should 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)