You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "CR Hota (JIRA)" <ji...@apache.org> on 2018/08/17 22:22:00 UTC

[jira] [Created] (HDFS-13834) RBF: Connection creator thread should catch Throwable

CR Hota created HDFS-13834:
------------------------------

             Summary: RBF: Connection creator thread should catch Throwable
                 Key: HDFS-13834
                 URL: https://issues.apache.org/jira/browse/HDFS-13834
             Project: Hadoop HDFS
          Issue Type: Bug
         Environment: 
{code:java}
    @Override
    public void run() {
      while (this.running) {
        try {
          ConnectionPool pool = this.queue.take();
          try {
            int total = pool.getNumConnections();
            int active = pool.getNumActiveConnections();
            if (pool.getNumConnections() < pool.getMaxSize() &&
                active >= MIN_ACTIVE_RATIO * total) {
              ConnectionContext conn = pool.newConnection();
              pool.addConnection(conn);
            } else {
              LOG.debug("Cannot add more than {} connections to {}",
                  pool.getMaxSize(), pool);
            }
          } catch (IOException e) {
            LOG.error("Cannot create a new connection", e);
          }
        } catch (InterruptedException e) {
          LOG.error("The connection creator was interrupted");
          this.running = false;
        }
      }
{code}

            Reporter: CR Hota
            Assignee: CR Hota


Connection creator thread is a single thread thats responsible for creating all downstream namenode connections.

This is very critical thread and hence should not die understand exception/error scenarios.

We saw this behavior in production systems where the thread died leaving the router process in bad state.

The thread should also catch a generic error/exception.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org