Skip to content

Commit

Permalink
RntbdServiceEndpoint fix (#14144)
Browse files Browse the repository at this point in the history
* fix

* updated comment as per code review

* change log updated

* updated changelog

* Updated version for release 4.3.2-beta.1

Co-authored-by: Kushagra Thapar <[email protected]>
  • Loading branch information
moderakh and kushagraThapar authored Aug 15, 2020
1 parent 78b45a8 commit c76fa78
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.3.2-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ com.azure:azure-core-serializer-json-gson;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-core-serializer-json-jackson;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-core-test;1.4.0;1.5.0-beta.1
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.6;1.0.0-beta.7
com.azure:azure-cosmos;4.3.1;4.4.0-beta.1
com.azure:azure-cosmos;4.3.1;4.3.2-beta.1
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-encryption;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-data-appconfiguration;1.1.4;1.2.0-beta.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.3.2-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-encryption/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.3.2-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<!-- Added this provided dependency to include necessary annotations used by "reactor-core".
Expand Down
5 changes: 3 additions & 2 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 4.4.0-beta.1 (Unreleased)

## 4.3.2-beta.1 (2020-08-14)
### Key Bug Fixes
* Fixed issue in RntbdServiceEndpoint to avoid early closure of an unused TCP connection.

## 4.3.1 (2020-08-13)
### Key Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This project provides SDK library in Java for interacting with [SQL API][sql_api
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.3.1</version>
<version>4.3.2-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Licensed under the MIT License.

<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.3.2-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<name>Microsoft Azure SDK for SQL API of Azure Cosmos DB Service</name>
<description>This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API</description>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ private RntbdServiceEndpoint(
this.channelPool = new RntbdClientChannelPool(this, bootstrap, config);
this.remoteAddress = bootstrap.config().remoteAddress();
this.concurrentRequests = new AtomicInteger();
this.lastRequestNanoTime = new AtomicLong();
// if no request has been sent over this endpoint we want to make sure we don't trigger a connection close
// due to elapsedTimeInNanos being negative.
// if no request has been sent initially over this endpoint, the below calculation can result in a very big difference
// long elapsedTimeInNanos = System.nanoTime() - endpoint.lastRequestNanoTime()
// which can cause endpoint to close unnecessary.
this.lastRequestNanoTime = new AtomicLong(System.nanoTime());
this.closed = new AtomicBoolean();
this.requestTimer = timer;

Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-spring-data-cosmos-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.4.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.3.2-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
Expand Down

0 comments on commit c76fa78

Please sign in to comment.