Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#### Other Changes
* Replaced per-client `Schedulers.newSingle()` schedulers in `GlobalEndpointManager` and `GlobalPartitionEndpointManagerForPerPartitionCircuitBreaker` with shared `BoundedElastic` schedulers in `CosmosSchedulers` to prevent thread count from scaling linearly with client/tenant count. - See [PR 49062](https://github.com/Azure/azure-sdk-for-java/pull/49062)
* Promoted the `ReadConsistencyStrategy` and `Http2ConnectionConfig` related `@Beta` APIs to GA. - See [PR 49345](https://github.com/Azure/azure-sdk-for-java/pull/49345)
* Fixed a sporadic `NullPointerException` in `JsonSerializable.getWithMapping` triggered by concurrent first-time calls to `DatabaseAccount.getConsistencyPolicy()` and its sibling lazy getters (`getReplicationPolicy`, `getSystemReplicationPolicy`, `getQueryEngineConfiguration`). The fix makes `JsonSerializable.propertyBag` `final`, closing an unsafe-publication race in the lazy-initialisation pattern. - See [Issue 49256](https://github.com/Azure/azure-sdk-for-java/issues/49256) and [PR #49258](https://github.com/Azure/azure-sdk-for-java/pull/49258)
* Changed 449 (`Retry With`) retries in Gateway V1 and Gateway V2 to be consistently orchestrated client-side. - See [PR 49332](https://github.com/Azure/azure-sdk-for-java/pull/49332)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.azure.cosmos.models.CosmosAuthorizationTokenResolver;
import com.azure.cosmos.models.CosmosClientTelemetryConfig;
import com.azure.cosmos.models.CosmosPermissionProperties;
import com.azure.cosmos.util.Beta;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -576,7 +575,6 @@ public CosmosClientBuilder consistencyLevel(ConsistencyLevel desiredConsistencyL
* @param readConsistencyStrategy {@link ReadConsistencyStrategy}
* @return current Builder
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosClientBuilder readConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.readConsistencyStrategy = readConsistencyStrategy;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.azure.cosmos.implementation.Utils;
import com.azure.cosmos.implementation.directconnectivity.StoreResponseDiagnostics;
import com.azure.cosmos.implementation.directconnectivity.StoreResultDiagnostics;
import com.azure.cosmos.util.Beta;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
Expand Down Expand Up @@ -256,7 +255,6 @@ public ConsistencyLevel getEffectiveConsistencyLevel() {
* The effective read consistency strategy used for the operation
* @return the effective read consistency strategy used for the operation
*/
@Beta(value = Beta.SinceVersion.V4_71_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getEffectiveReadConsistencyStrategy() {
return this.readConsistencyStrategy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.implementation.OverridableRequestOptions;
import com.azure.cosmos.models.DedicatedGatewayRequestOptions;
import com.azure.cosmos.util.Beta;

import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -44,7 +43,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy. It could be null if not defined or called on an irrelevant operation.
*/
@Beta(value = Beta.SinceVersion.V4_71_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return requestOptions.getReadConsistencyStrategy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import com.azure.core.http.ProxyOptions;
import com.azure.cosmos.implementation.Configs;
import com.azure.cosmos.util.Beta;

import java.time.Duration;

Expand Down Expand Up @@ -143,7 +142,6 @@ public GatewayConnectionConfig setProxy(ProxyOptions proxy) {
* Get the http2 connection config.
* @return the {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig getHttp2ConnectionConfig() {
return http2ConnectionConfig;
}
Expand All @@ -152,7 +150,6 @@ public Http2ConnectionConfig getHttp2ConnectionConfig() {
* Set the http2 connection config.
* @param http2ConnectionConfig the {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public GatewayConnectionConfig setHttp2ConnectionConfig(Http2ConnectionConfig http2ConnectionConfig) {
checkNotNull(http2ConnectionConfig, "Argument 'http2ConnectionConfig' can not be null");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@

import com.azure.cosmos.implementation.Configs;
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.util.Beta;

/***
* Represents the http2 connection config associated with Cosmos Client in the Azure Cosmos DB database service.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public class Http2ConnectionConfig {
private Integer maxConnectionPoolSize;
private Integer minConnectionPoolSize;
Expand All @@ -20,7 +18,6 @@ public class Http2ConnectionConfig {
/***
* The constructor of Http2ConnectionConfig.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig() {
}

Expand All @@ -29,7 +26,6 @@ public Http2ConnectionConfig() {
*
* @return the configured max number of live connections to keep in the pool.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Integer getMaxConnectionPoolSize() {
return maxConnectionPoolSize;
}
Expand All @@ -47,7 +43,6 @@ int getEffectiveMaxConnectionPoolSize() {
* If null, the default value `1000` will be applied for http/2.
* @return the current {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig setMaxConnectionPoolSize(Integer maxConnectionPoolSize) {
this.maxConnectionPoolSize = maxConnectionPoolSize;
return this;
Expand All @@ -57,7 +52,6 @@ public Http2ConnectionConfig setMaxConnectionPoolSize(Integer maxConnectionPoolS
* Get the maximum number of the concurrent streams that can be opened to the remote peer.
* @return the maximum number of the concurrent streams that can be opened to the remote peer.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Integer getMaxConcurrentStreams() {
return maxConcurrentStreams;
}
Expand All @@ -76,7 +70,6 @@ int getEffectiveMaxConcurrentStreams() {
* If null, the default value `30` will be applied for http/2.
* @return the current {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig setMaxConcurrentStreams(Integer maxConcurrentStreams) {
this.maxConcurrentStreams = maxConcurrentStreams;
return this;
Expand All @@ -86,7 +79,6 @@ public Http2ConnectionConfig setMaxConcurrentStreams(Integer maxConcurrentStream
* Get the minimum number of live connections to keep in the pool (can be the best effort).
* @return the minimum number of live connections to keep in the pool (can be the best effort).
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Integer getMinConnectionPoolSize() {
return minConnectionPoolSize;
}
Expand All @@ -102,7 +94,6 @@ int getEffectiveMinConnectionPoolSize() {
* If null, the default value `1` will be applied for http/2.
* @return the current {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig setMinConnectionPoolSize(Integer minConnectionPoolSize) {
this.minConnectionPoolSize = minConnectionPoolSize;

Expand All @@ -113,7 +104,6 @@ public Http2ConnectionConfig setMinConnectionPoolSize(Integer minConnectionPoolS
* return the flag to indicate whether http2 is enabled.
* @return the flag to indicate whether http2 is enabled.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Boolean isEnabled() {
return enabled;
}
Expand All @@ -129,7 +119,6 @@ boolean isEffectivelyEnabled() {
* @param enabled the flag to indicate whether http2 is enabled.
* @return the current {@link Http2ConnectionConfig}.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public Http2ConnectionConfig setEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.implementation.OperationType;
import com.azure.cosmos.implementation.ResourceType;
import com.azure.cosmos.util.Beta;
import com.fasterxml.jackson.annotation.JsonValue;

import java.util.HashMap;
Expand All @@ -24,7 +23,6 @@
* <p>
* NOTE: The ReadConsistencyStrategy is currently only working when using direct mode
Comment thread
FabianMeiswinkel marked this conversation as resolved.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public enum ReadConsistencyStrategy {
Comment thread
FabianMeiswinkel marked this conversation as resolved.

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.azure.cosmos.models.CosmosQueryRequestOptions;
import com.azure.cosmos.models.CosmosRequestOptions;
import com.azure.cosmos.models.DedicatedGatewayRequestOptions;
import com.azure.cosmos.util.Beta;

import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -110,7 +109,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return readConsistencyStrategy;
}
Expand Down Expand Up @@ -146,7 +144,6 @@ public T setConsistencyLevel(ConsistencyLevel consistencyLevel) {
* @return the request options.
*/
@SuppressWarnings("unchecked")
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public T setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.readConsistencyStrategy = readConsistencyStrategy;
return (T)this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public CosmosChangeFeedRequestOptions setMaxItemCount(int maxItemCount) {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return this.actualRequestOptions.getReadConsistencyStrategy();
}
Expand All @@ -110,7 +109,6 @@ public ReadConsistencyStrategy getReadConsistencyStrategy() {
* @param readConsistencyStrategy the consistency level.
* @return the request options.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosChangeFeedRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.actualRequestOptions.setReadConsistencyStrategy(readConsistencyStrategy);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.azure.cosmos.implementation.RequestOptions;
import com.azure.cosmos.implementation.apachecommons.collections.list.UnmodifiableList;
import com.azure.cosmos.implementation.spark.OperationContextAndListenerTuple;
import com.azure.cosmos.util.Beta;

import java.time.Duration;
import java.util.ArrayList;
Expand Down Expand Up @@ -172,7 +171,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return readConsistencyStrategy;
}
Expand Down Expand Up @@ -210,7 +208,6 @@ public CosmosItemRequestOptions setConsistencyLevel(ConsistencyLevel consistency
* @param readConsistencyStrategy the consistency level.
* @return the CosmosItemRequestOptions.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosItemRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.readConsistencyStrategy = readConsistencyStrategy;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.azure.cosmos.implementation.CosmosQueryRequestOptionsImpl;
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.implementation.RequestOptions;
import com.azure.cosmos.util.Beta;

import java.time.Duration;
import java.util.List;
Expand Down Expand Up @@ -69,7 +68,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return this.actualRequestOptions.getReadConsistencyStrategy();
}
Expand Down Expand Up @@ -103,7 +101,6 @@ public CosmosQueryRequestOptions setConsistencyLevel(ConsistencyLevel consistenc
* @param readConsistencyStrategy the consistency level.
* @return the CosmosQueryRequestOptions.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosQueryRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.actualRequestOptions.setReadConsistencyStrategy(readConsistencyStrategy);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.azure.cosmos.implementation.CosmosReadManyByPartitionKeysRequestOptionsImpl;
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.implementation.Utils;
import com.azure.cosmos.util.Beta;

import java.time.Duration;
import java.util.List;
Expand Down Expand Up @@ -143,7 +142,6 @@ public CosmosReadManyByPartitionKeysRequestOptions setMaxBatchSize(int maxBatchS
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return this.actualRequestOptions.getReadConsistencyStrategy();
}
Expand All @@ -154,7 +152,6 @@ public ReadConsistencyStrategy getReadConsistencyStrategy() {
* @param readConsistencyStrategy the read consistency strategy.
* @return the {@link CosmosReadManyByPartitionKeysRequestOptions} for fluent chaining.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosReadManyByPartitionKeysRequestOptions setReadConsistencyStrategy(
ReadConsistencyStrategy readConsistencyStrategy) {
this.actualRequestOptions.setReadConsistencyStrategy(readConsistencyStrategy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.azure.cosmos.implementation.CosmosQueryRequestOptionsBase;
import com.azure.cosmos.implementation.CosmosReadManyRequestOptionsImpl;
import com.azure.cosmos.implementation.ImplementationBridgeHelpers;
import com.azure.cosmos.util.Beta;

import java.time.Duration;
import java.util.List;
Expand Down Expand Up @@ -58,7 +57,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return this.actualRequestOptions.getReadConsistencyStrategy();
}
Expand Down Expand Up @@ -92,7 +90,6 @@ public CosmosReadManyRequestOptions setConsistencyLevel(ConsistencyLevel consist
* @param readConsistencyStrategy the consistency level.
* @return the CosmosReadManyRequestOptions.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosReadManyRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.actualRequestOptions.setReadConsistencyStrategy(readConsistencyStrategy);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.azure.cosmos.CosmosItemSerializer;
import com.azure.cosmos.ReadConsistencyStrategy;
import com.azure.cosmos.implementation.apachecommons.collections.list.UnmodifiableList;
import com.azure.cosmos.util.Beta;

import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -72,7 +71,6 @@ public CosmosRequestOptions setConsistencyLevel(ConsistencyLevel consistencyLeve
* @param readConsistencyStrategy the read consistency strategy.
* @return current CosmosRequestOptions.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public CosmosRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) {
this.readConsistencyStrategy = readConsistencyStrategy;
return this;
Expand Down Expand Up @@ -433,7 +431,6 @@ public ConsistencyLevel getConsistencyLevel() {
*
* @return the read consistency strategy.
*/
@Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING)
public ReadConsistencyStrategy getReadConsistencyStrategy() {
return this.readConsistencyStrategy;
}
Expand Down