xichen01 commented on PR #6656:
URL: https://github.com/apache/ozone/pull/6656#issuecomment-2103082479

   > This PR also adds Guava Cache with some hard coded size (50,000). ....
   
   In fact, the reason I use Guava Cache is to prevent accidents from occurring 
that would result in too many keys in the cache.  Guava Cache makes it easy to 
control how much to cache.
   
   If we can guarantee the number of keys to be cached ( hostname, ip, uuid, 
... (should not be too much.)), I think we can use a simpler `Map` Cache 
structure such as `ConcurrentHashMap`
   
   > That's why I suggest to add StringWithByteString. Please consider it.
   
   `StringWithByteString` still needs to repeatedly calculate 
`ByteString.copyFromUtf8`, which moves the call of `ByteString.copyFromUtf8` 
from inside protobuf to `StringWithByteString` (Some `DatanodeDetails` have 
short lifecycles, may only be accessed once)
   But for `DatanodeDetail` in Pipeline Cache, it will be effective solution
   
   How do you think?
   


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