oracle / oracle/oci-java-sdk

Performance regression in versions 2.0.0 to 2.2.0 for some services (fixed in v2.3.0)

Open
#320 1 comment 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

In versions 2.0.0 to 2.2.0, you may encounter performance regressions when using the SDK with some OCI services. The regression surfaces itself as a 3-second increase in latency in SDK operations made to some OCI services. This performance regression was fixed in version 2.3.0.

This issue has been confirmed to impact the OCI Streaming service, and likely impacts the Email Delivery, Health Checks, NoSQL Database Cloud, Registry, Generic Artifacts, and Web Application Acceleration and Security (WAAS) services as well. This list is not comprehensive – it is possible you may encounter the issue against other OCI services as well.

The issue has been confirmed to NOT affect the OCI Object Storage service.

We have fixed this issue in version 2.3.0. If you are experiencing this issue, we recommend that you upgrade to version 2.3.0 or later (Recommended).

If you are experiencing this issue, but you cannot upgrade to version 2.3.0 or later, there are some workarounds you can do:

  • Disable support for the SDK's Expect: 100-Continue feature by doing setting the OCI_JAVASDK_JERSEY_CLIENT_DEFAULT_CONNECTOR_ENABLED environment variable to true.
# Bash
export OCI_JAVASDK_JERSEY_CLIENT_DEFAULT_CONNECTOR_ENABLED=true
  • Or, disable support for the SDK's Expect: 100-Continue feature at the client level by setting the ApacheConnectorProperties.expectContinue property to false.
ApacheConnectorProperties apacheConnectorProperties =
        ApacheConnectorProperties.builder()
                .expectContinue(false)
                .build();

ApacheConfigurator configurator = new ApacheConfigurator(apacheConnectorProperties);
// or, for clients that should not buffer requests into memory
// ApacheConfigurator configurator = new ApacheConfigurator.NonBuffering(apacheConnectorProperties);

// Initialize the client with the Apache Configurator with custom properties
StreamAdminClient streamAdminClient =
    StreamAdminClient.builder()
                     .clientConfigurator(configurator)
                     .build(provider);

// For the StreamClient, use
Stream stream = ... // retrieve using streamAdminClient.getStream

StreamClient streamClient = StreamClient.builder()
                                        .clientConfigurator(configurator)
                                        .stream(stream)
                                        .build(provider);

See "Switching to Jersey Default HttpUrlConnectorProvider" section in the ApacheConnector README.

  • Or, use SDK version 1.37.2 or earlier.
  • Or, use the SDK's raw request signer to make requests to OCI services for any requests where you are experiencing performance degradation. An example on how to use the raw request signer is here.

If you have any questions, please feel free to comment on this GitHub issue and we will be happy to help.

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

Read the issue body, the ApacheConnector README section on switching to Jersey Default HttpUrlConnectorProvider, and bmc-examples/src/main/java/RawRestCallExample.java. The issue is already fixed in SDK version 2.3.0; done means confirming the affected version and documenting or applying an available upgrade or workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, cloud, performance
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.