couchbaselabs / couchbaselabs/walrus

Stale=false doesn't return latest data in some scenarios

Open
#18 1 comment 0 reactions 0 assignees View on GitHub
icebox
Dominant language
Go
Stars
28
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Moved from https://github.com/couchbase/sync_gateway/issues/1951:

> My understanding of the purpose of having the stale=false option on view queries was to ensure that the view was up to date with documents already added, allowing the possibility of "read your own writes" for such indexed queries. Is this correct? If so then it sometimes fails.
>
> It seems that if a view is queried before an insert into the database then a subsequent query of the view can fail.
>
> I have isolated the problem in a test:
>
> Steps to reproduce here:
> https://gist.github.com/paulharter/e33422b1f7d20de462f8b48e07f10310

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reproduction linked in the issue's gist and trace the stale=false view-query path it exercises. Confirm the failure sequence by querying a view before and after an insert; done means the subsequent query returns the newly added data.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.