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

Remove custom backoff logic for sending segments #186

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

srprash
Copy link
Collaborator

@srprash srprash commented Jan 26, 2023

Issue:
The current behavior of X-Ray Daemon when it fails to send segments is to block the send which can lead to build up of segments in memory in high traffic situations. There is a backoff logic in addition to the one on the AWS SDK client. This additional backoff logic can make it difficult to reason about the retry policies of the X-Ray Daemon.

Description of changes:
Removed custom code for backoff logic and related unit tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@srprash srprash requested a review from a team as a code owner January 26, 2023 15:49
@@ -68,7 +61,7 @@ func (s *segmentsBatch) send(batch []*string) {
}

func (s *segmentsBatch) poll() {
failedAttempt := 0
//failedAttempt := 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's delete this instead of commenting it out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching that!

@@ -112,157 +110,6 @@ func TestPollSendSuccess(t *testing.T) {
assert.True(t, strings.Contains(log.Logs[1], doneMsg))
}

func TestPollSendFailedOnceMoreThanMin(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We removed quite a few tests because of the new functionality.

Can we add some back in that test the new functionality?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With the removal of custom backoff logic, we automatically fall to the AWS SDK retry behavior which is not a new functionality in our code base. Are you suggesting we add a unit test for the AWS SDK retry functionality? IMO it won't be appropriate because if their retry behavior changes, it will break our tests.

@srprash srprash merged commit dc5f98d into aws:master Jan 27, 2023
@srprash srprash deleted the remove_backoff branch January 27, 2023 18:47
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.

None yet

2 participants