Driver attempts to create an array of size -1 when initializing connections in HostConnectionPool.initAsync if reusing connection and CoreConnectionsPerHost is 0.

Description

When the driver is able to reconnect to a Host that was previously DOWN, it may reuse the connection used for the reconnect attempt. In this case, the driver tries to create PoolingOptions.getCoreConnectionsPerHost - 1 connections for the pool.

If the configured core connections per host is 0 (which is valid) the driver requests -1 connections via ConnectionFactory.newConnections() which attempts to create an array of size -1 which fails:

This issue has seemed to exist since (2.0.12) from what I can tell. To work around it, configure the core connections per host option to at least 1.

Environment

None

Pull Requests

None
Fixed

Assignee

Marcos Vinícius

Reporter

Andy Tolbert

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure