Skip to content
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

CXXCBC-480 LookupInAnyReplica TooManySpecs Failures #539

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions core/impl/collection.cxx
Expand Up @@ -621,9 +621,6 @@ class collection_impl : public std::enable_shared_from_this<collection_impl>
if (!config.capabilities.supports_subdoc_read_replica()) {
ec = errc::common::feature_not_available;
}
if (r->specs().size() > 16) {
ec = errc::common::invalid_argument;
}
if (ec) {
return h(core::make_subdocument_error_context(make_key_value_error_context(ec, r->id()), ec, {}, {}, false),
lookup_in_replica_result{});
Expand Down
3 changes: 0 additions & 3 deletions core/operations/document_lookup_in_any_replica.hxx
Expand Up @@ -79,9 +79,6 @@ struct lookup_in_any_replica_request {
if (!config.capabilities.supports_subdoc_read_replica()) {
ec = errc::common::feature_not_available;
}
if (specs.size() > 16) {
ec = errc::common::invalid_argument;
}

if (ec) {
std::optional<std::string> first_error_path{};
Expand Down
4 changes: 2 additions & 2 deletions test/test_integration_subdoc.cxx
Expand Up @@ -1548,7 +1548,7 @@ TEST_CASE("integration: subdoc any replica reads", "[integration]")
req.specs = specs.specs();

auto resp = test::utils::execute(integration.cluster, req);
REQUIRE(resp.ctx.ec() == couchbase::errc::common::invalid_argument);
REQUIRE(resp.ctx.ec() == couchbase::errc::key_value::document_irretrievable);
REQUIRE(resp.fields.empty());
}

Expand Down Expand Up @@ -1588,7 +1588,7 @@ TEST_CASE("integration: subdoc any replica reads", "[integration]")
specs.push_back(couchbase::lookup_in_specs::get("dictkey"));
}
auto [ctx, result] = collection.lookup_in_any_replica(key, specs).get();
REQUIRE(ctx.ec() == couchbase::errc::common::invalid_argument);
REQUIRE(ctx.ec() == couchbase::errc::key_value::document_irretrievable);
REQUIRE(result.cas().empty());
}

Expand Down