oracle / oracle/oci-java-sdk

Race condition in CircuitBreaker leading to NoSuchElementException

Open
#491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SDK
Dominant language
Java
Stars
243
Forks
171
Avg merge
30m
Merged PRs (30d)
4

Description

We have fixed this issue in version 2.51.2. If you are using any OCI Java SDK version(s) >= 2.47.0 and < 2.51.2, we recommend you to update to version 2.51.2 or later. If you are not using any of the affected OCI Java SDK versions, you can ignore this issue.

If for some reason you are not able to update to a non-affected version at this time, another option is to disable and opt out of the SDK's default support for circuit breakers, in service clients that you use in your code and which have enabled circuit breakers by default (almost all service clients). However, our recommended option is not this, but rather to instead update to version 2.51.2 or later.


If you are using the OCI Java SDK at any version(s) >= 2.47.0 and < 2.51.2, then you may be affected by a bug in the SDK's circuit breaker.

Description

When using OCI Java SDK versions >= 2.47.0 and versions < 2.51.2, CircuitBreaker may fail with NoSuchElementException when trying to remove elements from historyQueue. If this exception is thrown, the connection from the connection pool is not released. This could potentially result in the SDK being unable to make additional requests, because all connections are blocked.

Affected Versions

To help prevent their use, all affected versions are marked pre-release with a label Do not use this version in the SDK's GitHub Releases.

Solution

Update to version 2.51.2 or later.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue states that the CircuitBreaker race condition was fixed in OCI Java SDK version 2.51.2 and provides no source files, tests, or entry points to inspect. Verify the affected version range and release guidance; the stated resolution is to use version 2.51.2 or later, so there is no remaining implementation task described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.