-
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
Use txn writer to write schema postings #4296
Conversation
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 a small comment but otherwise it
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @animesh2049, @ashish-goswami, @mangalaman93, and @manishrjain)
dgraph/cmd/bulk/schema.go, line 146 at r1 (raw file):
func (s *schemaStore) write(db *badger.DB, preds []string) { // Write schema always at timestamp 1, s.state.writeTs may not be equal to 1
I'd move this comment right above the line where the schema is actually being written.
Also, change the comment to say "Write schema and 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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @animesh2049, @mangalaman93, @manishrjain, and @martinmr)
dgraph/cmd/bulk/schema.go, line 146 at r1 (raw file):
Previously, martinmr (Martin Martinez Rivera) wrote…
I'd move this comment right above the line where the schema is actually being written.
Also, change the comment to say "Write schema and types".
Done.
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.
Generally looks good, we should add a test that verifies this. We can change the name of the test such that it doesn't run by the CI.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @animesh2049, @manishrjain, and @martinmr)
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 r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @animesh2049 and @martinmr)
Fixes #3916
Although I was not able to reproduce this. Stacktrace suggests, while writing schema to Badger, it got crashed with error:
Txn is too big to fit into one request
. This might be because, we are using single transaction to write schema for all predicates.This PR, replaces single transaction with TxnWriter to write schema.
This change is