Comments (7)
Michael Nitschinger commented
Can you copy a code snippet that reproduces the issue here? Also, can you do a get() on the document and see if its actually deleted or not?
Which server version are you using?
from spring-data-couchbase.
deepak vohra commented
The error level has reduced as the deleted IDs are not listed on re-testing but the count() method continues to return the document count before the delete for two consecutive runs of BlogPostService service application after the document IDs have been deleted. The count returned by the count() method is not in sync with the documents in the server.
long count = repository.count();
System.out.println("Number of blogposts: " + count);
Can you copy a code snippet that reproduces the issue here?
Same code example as in https://github.com/spring-projects/spring-data-couchbase
ApplicationContext context = new AnnotationConfigApplicationContext(ApplicationConfig.class);
BlogPostRepository repository = context.getBean(BlogPostRepository.class);
First, a minor correction: "bean" in the following statement should be replaced with "repository".
BlogPost post = bean.findOne("blogpost:my-id");
Add some blogposts to the "default" bucket.
Also, add a view "all" and a design document "blogpost".
Delete all with deleteAll().
repository.deleteAll();
Also, can you do a get() on the document and see if its actually deleted or not?
The repository.findOne on a deleted document ID returns a NullPointerException in the next run of the BlogPostService service application.
Which server version are you using?
64-bit Windows 2.1.1 Release Community Edition
from spring-data-couchbase.
Michael Nitschinger commented
Jeah, that's kind of expected! It uses Stale = Update_After for the view queries (the other options would be stale=true or stale=false). I'll plan to have a param in the @View
annotation where you can override this default.
Cheers,
Michael
from spring-data-couchbase.
deepak vohra commented
The setStale(Stale stale) is set to Stale.FALSE
from spring-data-couchbase.
Michael Nitschinger commented
How? Currently, you can't change the query params for a repository query, that way its always update_after.
Also note that writes are async and need some time to be persisted to disk and updated in the indexer
from spring-data-couchbase.
Michael Nitschinger commented
so while this is expected behaviour, can you send me the stack trace of that NPE? If that NPE originates in the module, then we need to fix it with something proper
from spring-data-couchbase.
Michael Nitschinger commented
This is expected behavior with views until we add the features where you can specify stale=false
from spring-data-couchbase.
Related Issues (20)
- Release 5.3 M2 (2024.0.0)
- Reintroduce Javadoc legacy mode
- Remove Querydsl and `com.couchbase` split packages HOT 2
- How to set the different config for different environments while using AbstractCouchbaseConfiguration HOT 2
- Bug: Regression - Spring Boot 3.2.3 app fails to compile with Spring Data Couchbase HOT 1
- issue with querydsl HOT 2
- "TypeAlias" does't work along with abstraction HOT 12
- update Couchbase Java SDK to 3.6.0 in main
- javax.inject dependency HOT 1
- Release 5.1.11 (2023.0.11)
- Release 5.2.5 (2023.1.5)
- Release 5.3 RC1 (2024.0.0)
- java.lang.NoClassDefFoundError: javax/inject/Inject: javax.inject.Inject when upgrading to Spring Boot 3.2.4 HOT 7
- Auto Index Creation creates indexes under _default scope HOT 1
- Sorry for the delay @mikereiche , Thanks for all the clarification.
- Compilation error due to QueryDSL annotation processor in Spring Data Couchbase 5.2.4 HOT 4
- Release 5.1.12 (2023.0.12)
- Release 5.2.6 (2023.1.6)
- Release 5.3 GA (2024.0.0)
- Runtime error when calling DeleteAllById(Iterable<T> list) if the repository extends DynamicProxyable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-couchbase.