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

Log errors after failing to send acks #3855

Merged
merged 4 commits into from
Nov 13, 2021
Merged

Conversation

ryanhall07
Copy link
Collaborator

This will help in debugging issues when the coordinator fails to send an
ack to the aggregator.

What this PR does / why we need it:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:


Does this PR require updating code package or user-facing documentation?:


This will help in debugging issues when the coordinator fails to send an
ack to the aggregator.
@ryanhall07 ryanhall07 requested a review from rallen090 October 19, 2021 15:53
}
c.w.Flush()
c.Unlock()
}

func (c *consumer) encodeAckWithLock(ackLen int) error {
func (c *consumer) sendAckWithLock(ackLen int) error {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seemed like a more appropriate method name, since it actually sends the ack over the network.

@ryanhall07 ryanhall07 enabled auto-merge (squash) October 19, 2021 15:59
c.ackPb.Metadata = c.ackPb.Metadata[:0]
if err != nil {
c.m.ackEncodeError.Inc(1)
return err
log.Error("failed to encode ack. client will retry sending message.", zap.Error(err))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously we would close the connection if we failed to encode, which doesn't make sense since it has nothing to do with the conn.

@ryanhall07 ryanhall07 disabled auto-merge October 19, 2021 19:33
@ryanhall07 ryanhall07 enabled auto-merge (squash) October 19, 2021 19:34
@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #3855 (dd86401) into master (dd86401) will not change coverage.
The diff coverage is n/a.

❗ Current head dd86401 differs from pull request most recent head 4b0b75e. Consider uploading reports for the commit 4b0b75e to get more accurate results

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3855   +/-   ##
======================================
  Coverage    56.9%   56.9%           
======================================
  Files         555     555           
  Lines       63390   63390           
======================================
  Hits        36079   36079           
  Misses      24121   24121           
  Partials     3190    3190           
Flag Coverage Δ
aggregator 62.3% <0.0%> (ø)
cluster ∅ <0.0%> (∅)
collector 58.4% <0.0%> (ø)
dbnode 60.6% <0.0%> (ø)
m3em 46.4% <0.0%> (ø)
metrics 19.7% <0.0%> (ø)
msg 75.2% <0.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd86401...4b0b75e. Read the comment docs.

@ryanhall07 ryanhall07 merged commit 02c3227 into master Nov 13, 2021
@ryanhall07 ryanhall07 deleted the rhall-log-ack-errors branch November 13, 2021 21:50
soundvibe added a commit that referenced this pull request Nov 16, 2021
* master:
  [agg] Use timestamp (not start aligned) for expiring forward versions (#3922)
  [tests] Add support for calls to label APIs in resources.Coordinator (#3916)
  [tests] Convert repair_and_replication Docker Integration Test to In-process (#3903)
  Always Close the conn if failed to write acks (#3855)
  [m3msg] Add receive and handle latency to consumers (#3920)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants