duongkame commented on PR #1126:
URL: https://github.com/apache/ratis/pull/1126#issuecomment-2261142824

   > As reported by @jojochuang in 
[RATIS-2099](https://issues.apache.org/jira/browse/RATIS-2099), there were a 
lot of `TermIndex$1` objects, 
![](https://camo.githubusercontent.com/8349b6152cb8dbc3535f5824cf858f5cd808b1c27c04d0975b7be0085a3a29b1/68747470733a2f2f6973737565732e6170616368652e6f72672f6a6972612f7365637572652f6174746163686d656e742f31333036393034362f53637265656e73686f74253230323032342d30352d32322532306174253230322e30382e3339254532253830254146504d2e706e67)
 It seems there are multiple objects created for the same value of `TermIndex`. 
If we have a cache, we make sure there is only one object for one value.
   > 
   > > You already create the TermIndex instance ...
   > 
   > Since the instance is short live, it will be gc'ed as young gen instead of 
promoting to old gen.
   
   We need to identify the source of them. I believe the TermIndex instances we 
cache are in the RaftLog cache. And in that cache, TermIndex (term, index) 
instances are unique. How does deduplication/interning help to reduce the 
number of cached TermIndex instances?


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