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

bug/TT-12184 #859

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bug/TT-12184 #859

wants to merge 1 commit into from

Conversation

sedkis
Copy link
Contributor

@sedkis sedkis commented Oct 29, 2024

Description

Changed the implementation of the stdout pump to finish writes regardless of previous context cancellations.

Motivation and Context

In few other pumps I've investigated (Splunk, Hybrid), the Pumps do not conditionally write based on context cancellations. Meaning, they always attempt to finish writing all records to their destination sinks. The STDOUT is the only Pump that purposefully closes attempts to finish writing based on any condition.

I've changed this behaviour so it now finishes all writes without being interrupted.

How This Has Been Tested

A unit test has been written that will force a cancellation context before the writes are started. Then, it will check to make sure all the writes took place. With the original implementation of stdout, this test failed. With the new implementation, this test passes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • go fmt -s
    • go vet

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.

1 participant