-
Notifications
You must be signed in to change notification settings - Fork 628
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
Send prevs on firehose #3449
base: main
Are you sure you want to change the base?
Send prevs on firehose #3449
Conversation
}, | ||
"prev": { | ||
"type": "cid-link", | ||
"description": "EXPERIMENTAL. For deletes and updates, the CID of the previous record. For creates, undefined." |
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.
Should we use a nullable
to be able to determine if the implementation supports this or not ?
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 had the same thought about detecting support. Daniel pointed out that we don't need to worry about that yet for the experimental phase. The tricky part here will be that we want to avoid optional, nullable fields.
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.
just to note, nullable
and optional
combined is a no-go (for golang), and that is especially relevant for these wire protocol details.
to cross-reference, I have a similar set of Lexicon changes proposed in this PR: #3391 |
Add an experimental field
subscribeRepos
commit ops which includes the cid of theprev
record in the case of updates/deletes.This is intended for testing of a new sync semantic that allows firehose consumers to do fully authenticated sync without keeping around a repo store.
Note on the implementation: I moved ops into the
CommitData
because they need a reference to theprev
which can only be gotten from the transactional update of the user's repository, not in the "write preparation" step since two writes at the same time will cause one transaction to fail and replay while write preparation happens outside of the transaction.