You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/08/24 13:54:45 UTC

[GitHub] [hbase] anoopsjohn commented on pull request #3426: HBASE-26032 Make HRegion.getStores() an O(1) operation

anoopsjohn commented on pull request #3426:
URL: https://github.com/apache/hbase/pull/3426#issuecomment-904664001


   Sorry I dont think my concern is addressed yet.  
   This method of getStores() is an API in Region which is an exposed interface for CPs.  So if a CP calls this, we will get the new CollectionAsList object which wraps the original data structure in HRegion object.   But a CP code can change this data structure by calling add() or remove() APIs.  In this new patch also this is possible.
   Now to solve this issue of avoiding creation of new ArrayList every time this API been called internally within RS code, we can have another way.  We can keep this method and its implementation as is in HRegion.
   Add a new method in HRegion (Not added in Region) which can return the stores.values() itself.  And within HBase code base, use this new API instead of old one.. 


-- 
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@hbase.apache.org

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