spring-data-couchbase icon indicating copy to clipboard operation
spring-data-couchbase copied to clipboard

Application should be able start even if the Couchbase server is not available [DATACOUCH-112]

Open spring-projects-issues opened this issue 11 years ago • 4 comments

Rodrigo Witzel opened DATACOUCH-112 and commented

The issue

At the moment the Spring application context cannot be created when the Couchbase Server is not available.

This is not ideal for both the application itself and integration tests.

Aim

The application should be able to start - even if the Couchbase Server is not available


Affects: 1.2 GA (Evans)

spring-projects-issues avatar Oct 14 '14 00:10 spring-projects-issues

Rodrigo Witzel commented

Hint: When I use Spring Data JPA or Spring Data MongoDb I can start the application context successfully even if MySQL or MongoDB are not available. Thus Spring-Data-Couchbase behaves a bit unexpectedly at the moment

spring-projects-issues avatar Oct 14 '14 10:10 spring-projects-issues

Michael Nitschinger commented

I see.. we are planning to change that with the new 2.0 SDK as well, but one question arises: when you access it it will fail right then or? How do you handle that case - I mean don't you want to fail fast if one of your database components is not available?

spring-projects-issues avatar Oct 14 '14 10:10 spring-projects-issues

Rodrigo Witzel commented

Yes, when I try to read or write data although the Couchbase server is not available, I should get an exception immediately.

Btw, MongoDB had a 'write mode' which ignored network errors but this is marked deprecated (see http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html#ERRORS_IGNORED). Obviously it does not seem to be a good idea to ignore or to hide errors when writing data

spring-projects-issues avatar Oct 14 '14 23:10 spring-projects-issues

Many of the couchbase artifacts are @Beans. Spring framework no longer allows null @Beans. https://github.com/spring-projects/spring-boot/issues/12563 All these beans would need to change from SomeObject to Supplier<SomeObject> or Optional<SomeObject>

mikereiche avatar May 09 '23 22:05 mikereiche