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

Get lists of predicates and types before sending the snapshot. #5488

Merged
merged 1 commit into from
May 22, 2020

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented May 20, 2020

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 Reviewable

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,

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?

Copy link
Contributor Author

@martinmr martinmr left a 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.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @vvbalaji-dgraph)

@martinmr martinmr merged commit 894387b into master May 22, 2020
@martinmr martinmr deleted the martinmr/streamshop-schema branch May 22, 2020 17:48
@martinmr martinmr restored the martinmr/streamshop-schema branch May 22, 2020 17:49
@martinmr martinmr deleted the martinmr/streamshop-schema branch May 22, 2020 17:49
martinmr added a commit that referenced this pull request May 22, 2020
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.
martinmr added a commit that referenced this pull request May 22, 2020
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.
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
…h-io#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants