killbill icon indicating copy to clipboard operation
killbill copied to clipboard

Issue #2116: Catalog initialization from plugin leads to lots of contention

Open nick-at-finix opened this issue 9 months ago • 2 comments

Different approach from the previous pull request, completely eliminates contention in CatalogSafetyInitializer for our usages.

nick-at-finix avatar May 06 '25 17:05 nick-at-finix

If this approach is generally acceptable I will clean this up, add some logging, and additional checks.

nick-at-finix avatar May 06 '25 18:05 nick-at-finix

Hm, over time this is creating a large number of fields:

tomcat@killbill-78f9c49cbf-4fbpm:~$ jmap -histo 1024 | head
Picked up JAVA_TOOL_OPTIONS: -Xms4G -Xmx14G
 num     #instances         #bytes  class name (module)
-------------------------------------------------------
   1:       6968230      501712560  java.lang.reflect.Field ([email protected])
   2:       1867911       74716440  java.util.TreeMap$Entry ([email protected])
   3:       1419893       68154864  java.util.TreeMap ([email protected])
   4:       1250399       62770992  [Ljava.lang.Object; ([email protected])
   5:       1241651       59599248  org.killbill.billing.catalog.DefaultPlanPhase
   6:        631985       56406208  [B ([email protected])
   7:        174948       55605752  [I ([email protected])
   8:       1583857       54595432  [Ljava.lang.reflect.Field; ([email protected])

I will iterate on this approach and improve

nick-at-finix avatar May 06 '25 18:05 nick-at-finix