I noticed a peculiar behavior of data source statistics.
1. an application (or a user using CLI) obtains a connection (or multiple connections) from a data source and then closes it
2. statistics get enabled for the data source, eg. /subsystem=datasources/data-source=ExampleDS/statistics=pool:write-attribute(name=statistics-enabled,value=true)
3. a flush-all-connections-in-pool is made for the data source
4. read the data source statistics - the previously active connections from step 1 (before the statistics get enabled/reset) are SUBTRACTED from the ActiveCount statistic (during the flush), so the ActiveCount is now a negative number
How to reproduce manually using CLI:
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:test-connection-in-pool
{
"outcome" => "success",
"result" => [true]
}
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:write-attribute(name=statistics-enabled,value=true)
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:flush-all-connection-in-pool
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"ActiveCount" => "-1",
"AvailableCount" => "20",
"AverageBlockingTime" => "0",
"AverageCreationTime" => "0",
"CreatedCount" => "0",
"DestroyedCount" => "1",
"InUseCount" => "0",
"MaxCreationTime" => "0",
"MaxUsedCount" => "0",
"MaxWaitCount" => "0",
"MaxWaitTime" => "0",
"TimedOut" => "0",
"TotalBlockingTime" => "0",
"TotalCreationTime" => "0",
"statistics-enabled" => true
}
}
- is incorporated by
-
JBEAP-2224 Upgrade IronJacamar from 1.3.1.Final-redhat-1 to 1.3.2.Final
-
- Closed
-
- is related to
-
JBJCA-1301 Clear pool statistics if created < destroyed
-
- Closed
-