-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 12.0.0, 12.0.1
-
Labels:
The ConnectionCount#getConnectionCount method is used to calculate an 'adjusted' maximum connection pool size for different connection pool types.
public int getConnectionCount(int max, ConnectionType type) { Reject.ifTrue(max < MINIMUM_CONNECTIONS); switch (type) { case CTS_ASYNC: if (storeMode == StoreMode.DEFAULT) { max = max / 2; } else { max = max - 2; } return findPowerOfTwo(max); case CTS_REAPER: return 1; case DATA_LAYER: /** * Ensure that the DATA_LAYER connection type fits into the available * connection space alongside CTS_REAPER and CTS_ASYNC */ int async = getConnectionCount(max, ConnectionType.CTS_ASYNC); int reaper = getConnectionCount(max, ConnectionType.CTS_REAPER); return max - (async + reaper); default: throw new IllegalStateException(); } }
However, with some input parameters this can lead to odd results:
For example, a standard installation with an external config store, when calculating a DATA_LAYER maximum, would have the following inputs:
max = 10
storeMode = EXTERNAL
type = DATA_LAYER
This results in:
10 - (8+1) = 1
Even with higher connection pools configured, this could sometimes lead to just 1 connection.
max = 130
leads to
130 - (128 + 1) = 1
- relates to
-
OPENAM-6456 Upgrading to OpenAM 12 hangs in DirectoryContentUpgrader
-
- Resolved
-