Skip to content

Commit a2a7546

Browse files
trondndaverigby
authored andcommitted
Revert "Add support for enabling xattr support"
This reverts commit 45ab791. We're going to encode the (presence and length) of xattrs as part of the flex meta field. By doing so we should enable the knowledge of them by using HELO with XATTR support (this is the same way we'll be enabling collection aware flex meta to be encoded in GetWithMeta and SetWithMeta). This means that we no longer need the control message. Change-Id: I3d28e720a8eb0b673b1eec0453599789d14766b8 Reviewed-on: http://review.couchbase.org/68917 Tested-by: buildbot <build@couchbase.com> Reviewed-by: Daniel Owen <owend@couchbase.com>
1 parent cff7563 commit a2a7546

2 files changed

Lines changed: 2 additions & 40 deletions

File tree

src/dcp/producer.cc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,8 @@ ENGINE_ERROR_CODE DcpProducer::control(uint32_t opaque, const void* key,
551551
uint32_t nvalue) {
552552
lastReceiveTime = ep_current_time();
553553
const char* param = static_cast<const char*>(key);
554-
const std::string keyStr(static_cast<const char*>(key), nkey);
555-
const std::string valueStr(static_cast<const char*>(value), nvalue);
554+
std::string keyStr(static_cast<const char*>(key), nkey);
555+
std::string valueStr(static_cast<const char*>(value), nvalue);
556556

557557
if (strncmp(param, "connection_buffer_size", nkey) == 0) {
558558
uint32_t size;
@@ -614,13 +614,6 @@ ENGINE_ERROR_CODE DcpProducer::control(uint32_t opaque, const void* key,
614614
priority.assign("low");
615615
return ENGINE_SUCCESS;
616616
}
617-
} else if (keyStr == "enable_xattr_support") {
618-
const bool enable = valueStr == "true";
619-
engine_.getServerApi()->cookie->set_dcp_xattr_support(getCookie(),
620-
enable);
621-
LOG(EXTENSION_LOG_INFO, "%s %s xattr support", logHeader(),
622-
enable ? "enable" : "disable");
623-
return ENGINE_SUCCESS;
624617
}
625618

626619
LOG(EXTENSION_LOG_WARNING, "%s Invalid ctrl parameter '%s' for %s",

tests/ep_testsuite_dcp.cc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5426,35 +5426,6 @@ static enum test_result test_set_dcp_param(ENGINE_HANDLE *h,
54265426
return SUCCESS;
54275427
}
54285428

5429-
static enum test_result test_set_dcp_xattr(ENGINE_HANDLE *h,
5430-
ENGINE_HANDLE_V1 *h1)
5431-
{
5432-
const auto *cookie = testHarness.create_cookie();
5433-
const std::string name("test_set_dcp_xattr");
5434-
uint32_t opaque = 0;
5435-
checkeq(ENGINE_SUCCESS,
5436-
h1->dcp.open(h, cookie, opaque, 0, DCP_OPEN_PRODUCER,
5437-
(void*)name.data(), uint16_t(name.size())),
5438-
"Failed dcp producer open connection.");
5439-
const std::string param_name("enable_xattr_support");
5440-
const std::string enable("true");
5441-
const std::string disable("false");
5442-
checkeq(ENGINE_SUCCESS,
5443-
h1->dcp.control(h, cookie, ++opaque,
5444-
param_name.c_str(), uint16_t(param_name.size()),
5445-
enable.c_str(), uint16_t(enable.size())),
5446-
"Failed to enable xattr support");
5447-
5448-
checkeq(ENGINE_SUCCESS,
5449-
h1->dcp.control(h, cookie, ++opaque,
5450-
param_name.c_str(), uint16_t(param_name.size()),
5451-
disable.c_str(), uint16_t(enable.size())),
5452-
"Failed to disable xattr support");
5453-
testHarness.destroy_cookie(cookie);
5454-
5455-
return SUCCESS;
5456-
}
5457-
54585429
// Test manifest //////////////////////////////////////////////////////////////
54595430

54605431
const char *default_dbname = "./ep_testsuite_dcp";
@@ -5698,7 +5669,5 @@ BaseTestCase testsuite_testcases[] = {
56985669
TestCase("test_set_dcp_param",
56995670
test_set_dcp_param, test_setup, teardown, NULL,
57005671
prepare, cleanup),
5701-
TestCase("test enable dcp xattr", test_set_dcp_xattr, test_setup,
5702-
teardown, nullptr, prepare, cleanup),
57035672
TestCase(NULL, NULL, NULL, NULL, NULL, prepare, cleanup)
57045673
};

0 commit comments

Comments
 (0)