Application should be able start even if the Couchbase server is not available [DATACOUCH-112]
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)
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
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?
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
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>