You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "guohao-rosicky (via GitHub)" <gi...@apache.org> on 2023/10/07 02:49:39 UTC

Re: [PR] HDDS-9330. Allocate ratis block latency optimization [ozone]

guohao-rosicky commented on PR #5335:
URL: https://github.com/apache/ozone/pull/5335#issuecomment-1751573837

   hi, @sodonnel Thanks for the continued focus on performance.
   
   > I wonder how this would work if you had only 2 owners, so the set has to be formed from 4400 containers. Perhaps it will still be faster than the containerInfo lookup and owner check the current code performs.
   
   According to the original logic, it doesn't seem to matter how many owners there are.
   Because it will iterate through all of them and return
   
   ```
   private NavigableSet<ContainerID> getContainersForOwner(
         Pipeline pipeline, String owner) throws IOException {
       NavigableSet<ContainerID> containerIDs =
           pipelineManager.getContainersInPipeline(pipeline.getId());
       Iterator<ContainerID> containerIDIterator = containerIDs.iterator();
       while (containerIDIterator.hasNext()) {
         ContainerID cid = containerIDIterator.next();
         try {
           if (!getContainer(cid).getOwner().equals(owner)) {
             containerIDIterator.remove();
           }
         } catch (ContainerNotFoundException e) {
           LOG.error("Could not find container info for container {}", cid, e);
           containerIDIterator.remove();
         }
       }
       return containerIDs;
     }
   ```
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org