Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shard substitution in changes feeds #1251

Merged
merged 2 commits into from
Mar 28, 2018
Merged

Conversation

davisp
Copy link
Member

@davisp davisp commented Mar 28, 2018

PSE changed the local_tree's join function so we need to update this. Previously we read _local docs out of the btree that ended up just giving us {DocId, {RevId, {BodyProps}}} to our callback. PSE changed things such that we now use couch_db:fold_local_docs which provides #doc records.

Shard substitution happens when a changes feed is provided with a since_seq that references a ndoe that does not or has errored out some how. The substitution then goes and looks for an internal replication document so that we don't have to rewrind the changes feed entirely (i.e., we look at the internal replication checkpoint and can rewind to the place where the node-being-replaced last sent us documents).

@wohali
Copy link
Member

wohali commented Mar 28, 2018

@davisp is this at all related to #1221 ? i'm not sure it does since it looks like the reported bug applies even when shards have not yet been substituted. if so ignore this comment.

@davisp
Copy link
Member Author

davisp commented Mar 28, 2018

@wohali Narp. That's unrelated.

@chewbranca
Copy link
Contributor

+1

@davisp davisp merged commit 99a64b2 into master Mar 28, 2018
@davisp davisp deleted the fix-shard-substitution branch March 29, 2018 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants