feat: implement graceful degradation and timeout propagation in sync …#22977
Open
Aayushiii25 wants to merge 1 commit into
Open
feat: implement graceful degradation and timeout propagation in sync …#22977Aayushiii25 wants to merge 1 commit into
Aayushiii25 wants to merge 1 commit into
Conversation
erezrokah
reviewed
Jun 19, 2026
erezrokah
left a comment
Member
There was a problem hiding this comment.
Hi @Aayushiii25, thank you for your contribution. Since this PR seems to try and fix 4 different distinct issues, do you mind opening a bug or feature report per fix first?
Please detail the impact of the bug/feature and share a reproduction so we can validate it on our end.
Cheers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed Memory Leaks in TransformerPipeline:
Replaced
time.After(1 * time.Second)with a reusabletime.NewTickerinside theSend()andstartBlocking()loops. This prevents the allocation of thousands of lingeringtime.Timerobjects during high-throughput syncs.Fixed Goroutine Leaks in TransformerPipeline:
Introduced
context.Contextcancellation for the backgroundRecv()goroutines. When the pipeline closes, the background goroutine now cleanly exits instead of being orphaned and blocking on a dead channel indefinitely.Best-Effort Parallel Destination Shutdown:
Previously, destination cleanup in
sync_v2.goandsync_v3.gowas sequential and fail-fast. If the first destination failed to close, subsequent destinations were never closed (leaving dangling streams and missing summary data). This PR implements a parallel shutdown sequence usingsync.WaitGroup, collecting all errors securely viasync.Mutexanderrors.Join, ensuring all destinations attempt to close cleanly.Plugin Timeout Propagation:
Previously, the CLI lacked timeout propagation for plugin lifecycle methods, meaning a stuck plugin would hang the entire CLI indefinitely. This PR introduces a
--plugin-timeoutCLI flag (defaulting to0for backward compatibility). It propagates a derived context toInit,Configure,Close,CloseAndRecv, andtestPluginConnectiongRPC calls to ensure the CLI can fail gracefully.