elek opened a new pull request #2105:
URL: https://github.com/apache/ozone/pull/2105


   ## What changes were proposed in this pull request?
   
   `BackgroundPipelineCreator` in SCM tries to pipelines with regular 
intervals. This check is very simple, if new pipeline can be created, it will 
create them.
   
   However, if the pipelines couldn't be created (which is very likely) an 
error message is printed out:
   
   ```
   scm_1       | 2021-03-31 15:34:57,004 [RatisPipelineUtilsThread - 0] ERROR 
pipeline.PipelineManagerV2Impl: Failed to create pipeline of type RATIS and 
factor THREE. Exception: Pipeline creation failed because nodes are engaged in 
other pipelines and every node can only be engaged in max 1 pipelines. Required 
3. Found 0
   ```
   
   Today it's printed out on ERROR level,l but this message doesn't provide any 
new information  I think the `PipelineManager.createPipeline` shouldn't user 
ERROR level especially as the exception is re-thrown:
   
    ```
        lock.lock();
       try {
         Pipeline pipeline = pipelineFactory.create(type, factor);
         stateManager.addPipeline(pipeline.getProtobufMessage(
             ClientVersions.CURRENT_VERSION));
         recordMetricsForPipeline(pipeline);
         return pipeline;
       } catch (IOException ex) {
         LOG.error("Failed to create pipeline of type {} and factor {}. " +
             "Exception: {}", type, factor, ex.getMessage());
         metrics.incNumPipelineCreationFailed();
         throw ex;
       } finally {
         lock.unlock();
       }
       ```
       
       It should be the responsibility of the caller to log the exception or 
ignore it (in case of BackgroundPipelineCreator)
   
   ## How was this patch tested?
   
   Full CI tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to