killbill
killbill copied to clipboard
Issue #2116: Catalog initialization from plugin leads to lots of contention
Different approach from the previous pull request, completely eliminates contention in CatalogSafetyInitializer for our usages.
If this approach is generally acceptable I will clean this up, add some logging, and additional checks.
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