-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-51373: Inspect and correct Item objects created by KVStore
MB-52793 exposed a bug in the handing of deletes which have a body (for System XATTRS). The root cause of that bug has been addressed under that bug, however the problem remains that /previous/ versions of KV-Engine could have written invalid deleted documents to disk, which could be encountered after an (offline) upgrade. Create a function that Couch/Magma-KVStore should call when they have created an Item from the underlying stored data. The function inspects the Item for datatype anomalies and if found logs and corrects the Item preventing exceptions occurring further up the stack. In this case we check for an Item with no value, but a datatype, which in the case of datatype=xattr can cause faults in xattr inspection code. Also adds a regression test which verifies that the sanitiztion of such items is correctly triggered when reading documents from disk in the various ways we access them. Change-Id: I235af07a1973c4af35301e17223e624a2cb5acf0 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/177217 Reviewed-by: Trond Norbye <[email protected]> Reviewed-by: Jim Walker <[email protected]> Well-Formed: Restriction Checker Tested-by: Build Bot <[email protected]>
- Loading branch information
Showing
6 changed files
with
202 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters