-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Get lists of predicates and types before sending the snapshot. #5488
Conversation
There could be changes to the schema while the snapshot is being sent. Therefore, the list of types and predicates that is sent at the end should be computed before the snapshot is sent.
Predicates: schema.State().Predicates(), | ||
Types: schema.State().Types(), | ||
Predicates: predicates, | ||
Types: types, |
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.
How is the snapshot used by an alpha? Would it have a problem if it interprets the data and encounters data for types that it doesn't know about?
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @vvbalaji-dgraph)
worker/snapshot.go, line 236 at r1 (raw file):
Previously, vvbalaji-dgraph (V V Balaji) wrote…
How is the snapshot used by an alpha? Would it have a problem if it interprets the data and encounters data for types that it doesn't know about?
No, the stream is set at snap.ReadTs so it won't pick up new data. The schema works differently (because it's all stored with ts 1) so that's why it should be read as soon as possible.
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.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @vvbalaji-dgraph)
There could be changes to the schema while the snapshot is being sent. Therefore, the list of types and predicates that is sent at the end should be computed before the snapshot is sent.
There could be changes to the schema while the snapshot is being sent. Therefore, the list of types and predicates that is sent at the end should be computed before the snapshot is sent.
…modeinc#5488) There could be changes to the schema while the snapshot is being sent. Therefore, the list of types and predicates that is sent at the end should be computed before the snapshot is sent.
There could be changes to the schema while the snapshot is being sent.
Therefore, the list of types and predicates that is sent at the end
should be computed before the snapshot is sent.
This change is