7.0.X, 7.1.X, Master
As part of normal cluster activity, we create an AggregateClassLoader to process every message. This can cause problems on IBM JDK, where a full garbage collection for a large number of class loaders will randomly take a long time (experiments randomly showed 2+ minutes, and some customers report 9+ minutes).
We can reproduce the large number of class loaders with the following steps.
Steps to Reproduce
- Start up the master node in your Liferay cluster.
- Use an IDE and attach a non-suspending, "Breakpoint hit" logging breakpoint to the call to the super constructor in AggregateClassLoader: https://github.com/liferay/liferay-portal/blob/7.1.0-ga1/portal-kernel/src/com/liferay/portal/kernel/util/AggregateClassLoader.java#L77
- Start up the second node in your Liferay cluster.
- Attempt to login/logout on the second node several times.
Expected behavior is that only a small number of class loaders will get created, and you won't see many messages in your IDE console. Actual behavior is that each login will create several dozen class loaders from the cluster invalidation activity sent from node2 to node1, and your IDE console will have hundreds of messages.