couchbaselabs / couchbaselabs/node-ottoman

Model.findById - Read from Replica

Open
#672 1 comment 0 reactions 1 assignee Claimed by @gsi-alejandro View on GitHub
P1
Dominant language
TypeScript
Stars
295
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Enhance model methods backed by KV operations to support reading from replicas

Model.findById uses `collection.get(key);` under the hood which fetches the document from Couchbase datastore's active node.
We need to enhance this by adding a findOption `replica` by default replica will be fault (the behavior that exists today) but when set to true findById should be able to attempt to get a document from the replica in lieu of document not found in the active node.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.