GithubHelp home page GithubHelp logo

Comments (7)

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

deepak vohra commented

The setStale(Stale stale) is set to Stale.FALSE

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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.

spring-projects-issues avatar spring-projects-issues commented on May 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.