-
Notifications
You must be signed in to change notification settings - Fork 928
Don't update query target metadata for updates #1063
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
Conversation
39e3203
to
d56990a
Compare
} | ||
}); | ||
}); | ||
return this.saveQueryData(transaction, queryData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will still potentially need to update the metadata. Once QueryCache
starts tracking the highest sequence number, it is likely that an update will trigger a metadata write.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to allow future Greg to set the sequence number as part of the setLastRemoteSnapshotVersion
call. Let me know if that will work as is for GC.
I am also still accepting nominations for the API name voting challenge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can remove this [potential] write.
transaction: PersistenceTransaction, | ||
snapshotVersion: SnapshotVersion | ||
highestListenSequenceNumber: number, | ||
lastRemoteSnapshotVersion?: SnapshotVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this optional? Do we ever not supply it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local Store doesn't always call setLastRemoteSnapshotVersion. Do you still want to update the listen sequence number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I do still want to update the sequence number. I guess optional is ok, although it looks like in that case we could also pass in the highest snapshot version and have it be a no-op. I don't feel too strongly either way though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can refine the API when we start porting to Web, but I believe the highest snapshot version that you know of could be SnapshotVersion.MIN (unless you pass the version that you just got from getLastRemoteSnapshotVersion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I meant the one you just read. But yeah, we can update later if need be.
This PR ports some of what I think I learned by reviewing Greg's latest Android PR to the Web. This save an additional read on every query update in Multi-Tab.
Greg - is this correct?