Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

RemoteRpc leaks HTTP connections when handling Datastore errors #185

@cmaan

Description

@cmaan

The exception handling code in com.google.datastore.v1.client.RemoteRpc does not close the HTTP content input stream after parsing the protobuf message com.google.rpc.Status (which describes the Datastore error).

Closing the content input stream allows the underlying HttpTransport to clean up resources (i.e. release the leased HTTP connection back to the connection pool). Without cleanup, alternative HttpTransport implementations (e.g. ApacheHttpTransport) experience connection timeouts as soon as they have depleted their connection pool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions