-
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
opt(dropPrefix): do logical drop for deleting predicates and indexing #7764
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.
We need to add a test here. If we have any tests for drop predicates, you could use the same one and keep doing writes. The writes should not get blocked.
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.
Shouldn't need to do this in Dgraph. Badger should work automatically, given an option.
Reviewable status: 0 of 8 files reviewed, all discussions resolved (waiting on @vvbalaji-dgraph)
5f62876
to
0fbbf39
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.
Reviewed 7 of 7 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @vvbalaji-dgraph)
82d4b4a
to
eb00203
Compare
…ing (#7764) Issue: DropPrefix is Stop The World operation. It blocks the incoming writes. Dgraph uses this API at a couple of places like: - drop data - reindexing - dropping predicate The last 2 usages can lead to bad user impact in a multi-tenant cluster. Solution: This PR allows DropPrefix to use the blocking/non-blocking DropPrefix based on DB option `AllowStopTheWorld` that can be set using `--badger` superflag. (cherry picked from commit c86b855)
…ing (#7764) (#7779) Issue: DropPrefix is Stop The World operation. It blocks the incoming writes. Dgraph uses this API at a couple of places like: - drop data - reindexing - dropping predicate The last 2 usages can lead to bad user impact in a multi-tenant cluster. Solution: This PR allows DropPrefix to use the blocking/non-blocking DropPrefix based on DB option `AllowStopTheWorld` that can be set using `--badger` superflag. (cherry picked from commit c86b855)
Addresses DGRAPH-3319 and Relates to dgraph-io/badger#1698
Issue:
DropPrefix
is Stop The World operation. It blocks the incoming writes. Dgraph uses this API at couple of places like:The last 2 usages can lead to bad user impact in a multi-tenant cluster.
Solution:
This PR replaces the usage of
DropPrefix
withDropPrefixNonBlocking
. This API does a logical delete and does not block the writes.This change is