Skip to content

Support configuring a default scan consistency. #1062

Closed
@aaronjwhiteside

Description

@aaronjwhiteside

In our organization it's rare that we require specific scan consistencies per query or even document, typically it's the same across all our documents and even projects. We use REQUEST_PLUS.

It would be nice if we could drive this by a configuration property in application.properties, though I expect Spring Boot to actually contain that logic via CouchbaseDataProperties, but it would be nice if Spring Data Couchbase exposed a way to supply this value without using any @ScanConsistency annotation.

Also I want to point out that right now all the methods inherited in org.springframework.data.couchbase.repository.CouchbaseRepository, from the extended interfaces, currently can ONLY use the default scan consistency of NOT_BOUNDED, with the exception of List<T> findAll(QueryScanConsistency queryScanConsistency); but honestly that method is an outlier.

This means for documents that require REQUEST_PLUS we cannot use any of the stock methods in org.springframework.data.couchbase.repository.CouchbaseRepository, and we end up re-implementing them in a custom repository just so we can annotate them with @ScanConsistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions