-
Notifications
You must be signed in to change notification settings - Fork 290
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
Watch improvements in datastore #1681
Conversation
I'll be adding additional integration tests on Monday, but putting this out for review in the meantime |
0e6ee51
to
44639fb
Compare
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.
First quick pass
c7549bb
to
be4a307
Compare
be4a307
to
7604e08
Compare
Rebased |
256a0da
to
5f0273f
Compare
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.
moar comments
} | ||
} | ||
|
||
if opts.Content&datastore.WatchCheckpoints == datastore.WatchCheckpoints { |
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.
hmm, why sending a checkpoint if a non-empty changeset existed?
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.
Because it was requested; we always send the checkpoint
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 do we need to send always the checkpoint? isn't it unnecessary work / CPU time in the client ?
5f0273f
to
15d8dec
Compare
Updated |
} | ||
} | ||
|
||
if opts.Content&datastore.WatchCheckpoints == datastore.WatchCheckpoints { |
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.
It seems like we don't have a test for checkpoints - run all CRDB tests with code coverage
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 don't because they aren't used externally yet
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.
It's still code written and it's at risk of being forgotten down the line.
internal/datastore/spanner/migrations/zz_migration.0007_register_combined_change_stream.go
Show resolved
Hide resolved
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.
Finally finished reviewing everything, thanks for your patience 🙏🏻
…ed Watch API supporting rels, schema and checkpoints
- CRDB - Postgres - Spanner The other datastores will simply report an error if asked for schema updates in Watch
… up schema watch to use the command line flag for all supported datastores
15d8dec
to
669c267
Compare
Updated |
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.
LGTM, thanks for addressing all the feedback, just one question
669c267
to
78390e1
Compare
Changes the Watch implementations to support a combined relationships, schema and checkpoint set of events