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: Destination Stop might block for 1 minute #79

Open
lovromazgon opened this issue Jun 16, 2023 · 0 comments
Open

Bug: Destination Stop might block for 1 minute #79

lovromazgon opened this issue Jun 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@lovromazgon
Copy link
Member

Bug description

I discovered this bug while reviewing and testing the grpc-client connector reconnects (conduitio-labs/conduit-connector-grpc-client#9). See steps to reproduce.

Steps to reproduce

  1. Have a grpc-client destination with the following config:
    reconnectDelay: 2s
    maxDowntime: 5s
    
  2. Start the test server, then start Conduit.
  3. Send 2 records into the pipeline, one record should be received by the server.
  4. Do not send back an acknowledgment and stop the server.

After 5 seconds the connector Write function will return an error (max downtime reached) and cause the pipeline to stop, but it won't stop entirely. The connector will keep running for another 1 minute, it will be blocked in the sdk Stop function and wait for the last position to be equal to the position of the second record.

The probable cause for this is that both records seemed to be successfully sent from the Conduit side, but it was actually just stored in the gRPC buffer, possibly even received by the server and buffered there. Only one record was received by the connector though, since it returned an error after that and stopped the stream. Conduit then calls Stop with the position of the second record, thinking the connector must have received it. The connector then waits for the last position to change for 1 minute and gives up afterwards. We could cut this time short if we detect that Run has already stopped running, in that case the last position obviously won't change anymore.

Version

v0.6.0

@lovromazgon lovromazgon added bug Something isn't working triage Needs to be triaged labels Jun 16, 2023
@simonl2002 simonl2002 removed the triage Needs to be triaged label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants