weizhouapache commented on PR #6845:
URL: https://github.com/apache/cloudstack/pull/6845#issuecomment-1344491021

   > I think this PR should be separated in two, as there are two different 
changes being proposed. This way we can keep things more organized and easier 
to review.
   
   @JoaoJandre 
   The reason I put them together is, these two plugins are very similar. 
   They both adjust host priority. 
   The only difference is host priority is +1 in NonStrictHostAffinityProcessor 
and -1 in NonStrictHostAntiAffinityProcessor.
   
   see code below
   ```
   public class NonStrictHostAntiAffinityProcessor extends 
NonStrictHostAffinityProcessor {
   
       @Override
       protected Integer adjustHostPriority(DeploymentPlan plan, Long hostId) {
           plan.adjustHostPriority(hostId, 
DeploymentPlan.HostPriorityAdjustment.LOWER);
           return plan.getHostPriorities().get(hostId);
       }
   }
   ```
   
   I can separate into two PRs of course. but I have to wait the plugin for 
non-strict host affinity to be merged, then create the pr for the plugin for 
non-strict anti-host affinity .
   It wastes time.
   I think it is unnecessary.
   
   Is there any code difficult for you to understand ?
   
   
   


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

Reply via email to