Backup schema keys in incremental backups.#5147
Conversation
manishrjain
left a comment
There was a problem hiding this comment.
Reviewed 6 of 7 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @martinmr)
worker/backup_processor.go, line 285 at r2 (raw file):
Value: valCopy, UserMeta: []byte{item.UserMeta()}, Version: 1,
item.Version()
worker/restore.go, line 193 at r2 (raw file):
// version value of one. kv.Key = restoreKey kv.Version = 1
Use the same version.
|
We should back port this 20.03 as well as 1.2 |
martinmr
left a comment
There was a problem hiding this comment.
Reviewable status: 5 of 7 files reviewed, 4 unresolved discussions (waiting on @golangcibot and @manishrjain)
worker/backup_processor.go, line 285 at r2 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
item.Version()
Done.
worker/restore.go, line 89 at r1 (raw file):
Previously, golangcibot (Bot from GolangCI) wrote…
Error return value of
db.DropPrefixis not checked (fromerrcheck)
Done.
worker/restore.go, line 90 at r1 (raw file):
Previously, golangcibot (Bot from GolangCI) wrote…
Error return value of
db.DropPrefixis not checked (fromerrcheck)
Done.
worker/restore.go, line 193 at r2 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Use the same version.
Done.
The full schema should be backed up during incremental backups. During restore, the schema should be cleared before processing each backup to end up with only the final schema.
The full schema should be backed up during incremental backups. During restore, the schema should be cleared before processing each backup to end up with only the final schema.
The full schema should be backed up during incremental backups. During restore, the schema should be cleared before processing each backup to end up with only the final schema.
The full schema should be backed up during incremental backups. During restore, the schema should be cleared before processing each backup to end up with only the final schema. (cherry picked from commit f8beadd)
Description.
The full schema should be backed up during incremental backups.
During restore, the schema should be cleared before processing each backup
to end up with only the final schema.
Also ensured that the Version of the schema keys is always one. AFAIK this is not
an issue but I think it's better to explicitly set the versions of these keys to 1 during
backups and restores.
GitHub Issue or Jira number.
https://dgraph.atlassian.net/browse/DGRAPH-1224
Affected releases.
20.03.1
Changelog tags.
fixed
Please indicate if this is a breaking change.
No
Please indicate if this is an enterprise feature.
Yes
Please indicate if documentation needs to be updated.
No
Please indicate if end to end testing is needed.
I added unit tests to ensure the schema is correct but it'd be good to manually test this before.
This change is