UCP does not Re-balance Connections in UP Event Processing

(Doc ID 2297081.1)

Last updated on AUGUST 22, 2017

Applies to:

JDBC - Version 12.1.0.2.0 to 12.1.0.2.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

Universal Connection Pool Fast Connection Failover (UCP FCF) does not re-balance connections through UP event processing.

When ONS detects RAC node UP event, it is expected that UCP re-balances existing connections to each node.
In case of the issue, all connections on the surviving RAC node remain on the node even after detecting UP event.


The example below assumes there are 20 connections in the UCP pool for a 2 Node RAC.
11 connections are created on node 1, and 9 connections on node 2 at UCP startup.

SQL> select inst_id, username, program from gv$session where username like 'SCOTT' order by inst_id;

INST_ID USERNAME PROGRAM
---------- ------------------------------ --------------------
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
1 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client


If you shutdown one of the instance (instance 1 in this case), UCP receives DOWN event from ONS.
You will see that session on instance 1 is no longer available.

INST_ID USERNAME PROGRAM
---------- ------------------------------ --------------------
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client

 

Then, restart the instance (instance 1 in this case).

At this time, UCP detects UP event from ONS, and it is expected that some connections running on the surviving instance are re-balanced.
In case of the issue, however, all existing connections are still running on the same instance.


Expected:

INST_ID USERNAME PROGRAM
---------- -------------------- ------------------------------------------------
1 SCOTT JDBC Thin Client <<
1 SCOTT JDBC Thin Client <<
1 SCOTT JDBC Thin Client <<
1 SCOTT JDBC Thin Client <<
1 SCOTT JDBC Thin Client <<
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client 

 

Not Expected:

INST_ID USERNAME PROGRAM
---------- ------------------------------ --------------------
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client
2 SCOTT JDBC Thin Client 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms