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

[forwarder] Make payload rejection log entry more explicit #3486

Merged
merged 1 commit into from Aug 22, 2017
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
2 changes: 1 addition & 1 deletion ddagent.py
Expand Up @@ -281,7 +281,7 @@ def on_response(self, response):
if response.error:
log.error("Response: %s" % response)
if response.code in RESPONSES_TO_REJECT:
self._trManager.tr_error_reject_request(self)
self._trManager.tr_error_reject_request(self, response.code)
else:
self._trManager.tr_error(self)
else:
Expand Down
6 changes: 3 additions & 3 deletions transaction.py
Expand Up @@ -282,13 +282,13 @@ def tr_error(self, tr):

self._trs_to_flush = new_trs_to_flush

def tr_error_reject_request(self, tr):
def tr_error_reject_request(self, tr, response_code):
self._running_flushes -= 1
self._finished_flushes += 1
tr.inc_error_count()
log.warn("Transaction %d is %sKB, it has been rejected as too large. "
"It will not be replayed.",
log.warn("Transaction %d has been rejected (code %d, size %sKB), it will not be replayed",
tr.get_id(),
response_code,
tr.get_size() / 1024)
self._remove(tr)
self._transactions_flushed += 1
Expand Down