Skip to content

v0.6.0 Release

Compare
Choose a tag to compare
@rohanshah18 rohanshah18 released this 09 Oct 21:15
· 103 commits to main since this release
eef17f8

Added: Asynchronous Stub

We have added the capability to expose a future stub, providing users with the ability to execute asynchronous gRPC requests. The future stub allows for concurrent requests, enhancing the efficiency of data plane operations.

Example

Below is a simple code example demonstrating how to utilize the future stub for making asynchronous gRPC request:

// Instantiate a Pinecone client configuration with the API key
PineconeClientConfig clientConfig = new PineconeClientConfig().withApiKey("PINECONE_API_KEY");

// Create a Pinecone client and establish a connection
PineconeClient client = new PineconeClient(clientConfig);
PineconeConnection connection = client.connectWithUrl("https://abcdefg-123-c01b9b5.svc.us-east1-gcp.pinecone.io/");

// Retrieve the future stub for asynchronous requests
VectorServiceGrpc.VectorServiceFutureStub futureStub = connection.getFutureStub();

// Prepare a DescribeIndexStatsRequest
DescribeIndexStatsRequest describeIndexStatsRequest = DescribeIndexStatsRequest.newBuilder().build();

// Execute the asynchronous request and handle the response
ListenableFuture<DescribeIndexStatsResponse> describeIndexStatsResponseFuture = futureStub.describeIndexStats(describeIndexStatsRequest);
try {
    DescribeIndexStatsResponse response = describeIndexStatsResponseFuture.get();
    logger.info("Received describe index stats response: " + response);
} catch (InterruptedException | ExecutionException e) {
    logger.error("Failed to retrieve describe index stats: " + e.getMessage());
}

Added: Integration tests

We have also added integration tests that will run after every commit to enhance testing capability.

What's Changed

New Contributors

Full Changelog: v0.5.1...v0.6.0