This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.35k
stars
1.99k
forks
source link
[BUG] Cosmos DB findByItem logs the following constantly when no item is found: "WebExceptionRetryPolicy() No Retrying on un-retryable exceptions on endpoint xxx" #37912
Describe the bug
Using Cosmos DB Spring Data, each read operation (using findbyId) which couldn't find the item in the database logs a WebExceptionRetryPolicy() No Retrying on un-retryable exceptions on endpoint xxx, operationType = Read, resourceType = Document, count = 0, isAddressRefresh = false. This didn't happen before, and it's cluttering the logs. The read operation still went successful (as in, it couldn't find the item).
We've upgraded our Spring Boot version from 3.1.3 to 3.1.6, and have upgraded our spring-cloud-azure version with spring-cloud-azure-starter-data-cosmos from 5.5.0 to 5.7.0. Each read operation is triggering the following log (real endpoint is replaced with xxx):
Exception or Stack TraceWebExceptionRetryPolicy() No Retrying on un-retryable exceptions on endpoint xxx, operationType = Read, resourceType = Document, count = 0, isAddressRefresh = false
To Reproduce
Steps to reproduce the behavior: (see code snippet)
Code SnippetuserRepository.findbyId(id, new PartitionKey(id)).get()
(The above operation should return a 404 — item not found in database)
UserRepository:
@Repository
public interface UserRepository extends CosmosRepository<User, String> {
}
Expected behavior
Why is this log shown for each read operation? The previous version we have used didn't log this for each read operation (where the item couldn't be found).
Setup (please complete the following information):
Frameworks Spring Boot, Azure Spring Cloud Azure Dependencies (with Spring-Cloud-Azure-Starter-Data-Cosmos)
Additional context
My only hunch is that Spring boot 3.1.x is not officially supported yet by spring cloud-azure-starter-data-cosmos.
Can this log be omitted at all? Do we have to implement some retry?
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
Describe the bug Using Cosmos DB Spring Data, each read operation (using
findbyId
) which couldn't find the item in the database logs aWebExceptionRetryPolicy() No Retrying on un-retryable exceptions on endpoint xxx, operationType = Read, resourceType = Document, count = 0, isAddressRefresh = false
. This didn't happen before, and it's cluttering the logs. The read operation still went successful (as in, it couldn't find the item). We've upgraded our Spring Boot version from3.1.3
to3.1.6
, and have upgraded our spring-cloud-azure version with spring-cloud-azure-starter-data-cosmos from5.5.0
to5.7.0
. Each read operation is triggering the following log (real endpoint is replaced withxxx
):Exception or Stack Trace
WebExceptionRetryPolicy() No Retrying on un-retryable exceptions on endpoint xxx, operationType = Read, resourceType = Document, count = 0, isAddressRefresh = false
To Reproduce Steps to reproduce the behavior: (see code snippet)
Code Snippet
userRepository.findbyId(id, new PartitionKey(id)).get()
(The above operation should return a 404 — item not found in database)
UserRepository:
Expected behavior Why is this log shown for each read operation? The previous version we have used didn't log this for each read operation (where the item couldn't be found).
Setup (please complete the following information):
org.springframework.boot:spring-boot-dependencies:3.1.6
,com.azure.spring:spring-cloud-azure-dependencies:5.7.0
(withspring-cloud-azure-starter-data-cosmos
)Additional context My only hunch is that Spring boot 3.1.x is not officially supported yet by spring cloud-azure-starter-data-cosmos. Can this log be omitted at all? Do we have to implement some retry?
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report