Skip to content

Commit

Permalink
[Cleanup] Remove unused method set_error_json_extras
Browse files Browse the repository at this point in the history
Change-Id: I3d2b51da21d48aabab050c0b77264b019dca61fa
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/181007
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
  • Loading branch information
trondn committed Oct 11, 2022
1 parent 1010163 commit caf2c2e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
5 changes: 0 additions & 5 deletions daemon/server_api.cc
Expand Up @@ -177,11 +177,6 @@ struct ServerCookieApi : public ServerCookieIface {
return getCookie(cookie).getConnection().getParentPort();
}

void set_error_json_extras(CookieIface& cookie,
const nlohmann::json& json) override {
getCookie(cookie).setErrorJsonExtras(json);
}

bool is_valid_json(CookieIface& cookieIface,
std::string_view view) override {
auto& cookie = getCookie(cookieIface);
Expand Down
4 changes: 0 additions & 4 deletions engines/ep/tests/module_tests/wrapped_server_cookie_iface.h
Expand Up @@ -89,10 +89,6 @@ class WrappedServerCookieIface : public ServerCookieIface {
in_port_t get_connected_port(const CookieIface& cookie) override {
return wrapped->get_connected_port(cookie);
}
void set_error_json_extras(CookieIface& cookie,
const nlohmann::json& json) override {
wrapped->set_error_json_extras(cookie, json);
}
bool is_valid_json(CookieIface& cookie, std::string_view view) override {
return wrapped->is_valid_json(cookie, view);
}
Expand Down
19 changes: 0 additions & 19 deletions include/memcached/server_cookie_iface.h
Expand Up @@ -163,25 +163,6 @@ struct ServerCookieIface {

virtual in_port_t get_connected_port(const CookieIface& cookie) = 0;

/**
* Set a JSON object to be included in an error response (along side
* anything set by set_error_context).
*
* The json object cannot include "error" as a top-level key
*
* Note this has no affect for the following response codes.
* cb::mcbp::Status::Success
* cb::mcbp::Status::SubdocSuccessDeleted
* cb::mcbp::Status::SubdocMultiPathFailure
* cb::mcbp::Status::Rollback
* cb::mcbp::Status::NotMyVbucket
*
* @param cookie the client cookie (to look up client connection)
* @param json extra json object to include in a error response.
*/
virtual void set_error_json_extras(CookieIface& cookie,
const nlohmann::json& json) = 0;

/// Validate the JSON. This method must NOT be called from a background
/// thread as it use the front-end-threads instance for a JSON validator
virtual bool is_valid_json(CookieIface& cookie, std::string_view) = 0;
Expand Down
4 changes: 0 additions & 4 deletions programs/engine_testapp/mock_server.cc
Expand Up @@ -313,10 +313,6 @@ struct MockServerCookieApi : public ServerCookieIface {
return cookie_to_mock_cookie(cookie).getParentPort();
}

void set_error_json_extras(CookieIface& cookie,
const nlohmann::json& json) override {
}

bool is_valid_json(CookieIface&, std::string_view view) override {
auto validator = cb::json::SyntaxValidator::New();
return validator->validate(view);
Expand Down

0 comments on commit caf2c2e

Please sign in to comment.