Skip to content

Commit 54794ec

Browse files
committed
MB-42352: allow_del_with_meta_prune_user_data true by default
Pre-6.6 versions are affected by invalid payloads generated by expirations. Ie, body or user-xattrs in the value. 6.6.0 fixes that. But, users of DelWithMeta may still fail validation when they want to store pre-6.6 data into a 6.6 node. Eg, backup/restore and XDCR. Since MB-36321 DelWithMeta can operate in a "sanitizer" mode that is off by default. This patch enables it, so any invalid payload will be sanitized and successfully stored in 6.6. The feature seems to have already a decent test coverage, introduced in http://review.couchbase.org/c/kv_engine/+/115904/ first and then expanded in http://review.couchbase.org/c/kv_engine/+/129191. Change-Id: I3e436bafd98d4eec9d91f34c5d45be882440d57e Reviewed-on: http://review.couchbase.org/c/kv_engine/+/139468 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]> Well-Formed: Build Bot <[email protected]>
1 parent ed5e97f commit 54794ec

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

engines/ep/configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"params": {
33
"allow_del_with_meta_prune_user_data" : {
4-
"default" : "false",
4+
"default" : "true",
55
"descr": "Let del_with_meta prune user data provided from the user instead of failing",
66
"dynamic" : true,
77
"type" : "bool"

tests/testapp/testapp_withmeta.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ TEST_P(WithMetaTest, MB36321_DeleteWithMetaRefuseUserXattrs) {
211211
return;
212212
}
213213

214+
{
215+
auto& conn = getAdminConnection();
216+
conn.selectBucket(bucketName);
217+
const auto setParam = BinprotSetParamCommand(
218+
cb::mcbp::request::SetParamPayload::Type::Flush,
219+
"allow_del_with_meta_prune_user_data",
220+
"false");
221+
const auto resp = BinprotMutationResponse(conn.execute(setParam));
222+
ASSERT_EQ(cb::mcbp::Status::Success, resp.getStatus());
223+
}
224+
214225
cb::xattr::Blob blob;
215226
blob.set("user", R"({"band":"Steel Panther"})");
216227
auto xattrValue = blob.finalize();

0 commit comments

Comments
 (0)