Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix: response ERR_OK though pass ERR_INVALID_DATA when meet too large size request #812

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/replica/replica_2pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ void replica::on_client_write(dsn::message_ex *request, bool ignore_throttling)

if (dsn_unlikely(_stub->_max_allowed_write_size &&
request->body_size() > _stub->_max_allowed_write_size)) {
response_client_write(request, ERR_INVALID_DATA);
std::string request_info = _app->dump_write_request(request);
dwarn_replica("client from {} write request body size exceed threshold, request = [{}], "
"request_body_size "
Expand All @@ -65,7 +66,6 @@ void replica::on_client_write(dsn::message_ex *request, bool ignore_throttling)
request->body_size(),
_stub->_max_allowed_write_size);
_stub->_counter_recent_write_size_exceed_threshold_count->increment();
response_client_write(request, ERR_INVALID_DATA);
return;
}

Expand Down