kerneltime commented on PR #3562:
URL: https://github.com/apache/ozone/pull/3562#issuecomment-1168810918

   > @kerneltime Thanks for working on this. I think we need some refactoring 
here. With this change, post move book-keeping will be done at three different 
places:
   > 
   > 1. `whenComplete((result, ex) -> {...}` in 
`ContainerBalancer#moveContainer`
   This gets called when the underlying replication manager completes
   > 2. `ContainerBalancer#checkIterationMoveResults`
   This gets evaluated for timeout when the logic in ContainerBalancer gives up 
on the replication.
   > 3. `ContainerBalancerMetrics#incrementCurrentIterationContainerMoveMetric` 
which is called in `ContainerBalancer#moveContainer`
   This is the same as 1. 
   > 
   > Do you think it's better to update metrics at just one place, preferably 
`ContainerBalancer#checkIterationMoveResults`?
   
   There are 2 different ways by which a timeout event can occur. We could 
split the timeout into 2 separate counters based on who gave up but that should 
be a different PR.
   
   There are 2 tests in `TestContainerBalancer` which trigger different ways in 
which timeout can occur and increment the same counter.
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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