-
Notifications
You must be signed in to change notification settings - Fork 577
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
Retry for batch API #941
Retry for batch API #941
Conversation
@djosephsen, thanks for your contribution. It's a good improvement. However, I think it would be more robust if we allowed to retry using |
Sounds great. My read on Send() is that it defers setting it's internal |
@djosephsen I will have a look at this tomorrow. Perhaps you have an idea of how to implement it? |
Oh sure, I just thought maybe you had an implementation in mind. I'll rewire this into Send() instead and see what it looks like. |
When this PR will be merged? I'm pretty sure that any flow need to be ably to retry sending. I guess it should be inside 'Send', not a new method 'retry' but anyway it would be nice to have any solution to retry |
Hey, I'm sorry, this fell off my radar because we've been experimenting with kafka-engine at $currjob. I'll make an effort to get this cleaned up and ready for review this week. Thanks for the reminder |
So, going over this, it struck me that the simplest solution is to just un-export Retry as previously proposed, and call it internally from Send() whenever the batch is marked as already sent. Some caveats:
|
Sorry but I think I might need help clearing the integration tests.. running
|
Guys! It needs one little step to pass through tests. Maybe just try to run them one more time? Some connections refused to cloud. |
@AndreiCrimezniuc all good Andrei. I will follow up on this PR soon. |
Intent of this PR is to propose the addition of a Retry() method to the client-facing Batch interface. Today, in the event of a Batch.Send() error, the caller is left with an interface type they can neither apply a new conn to, nor derive their original rows from.
This pr extends the interface with a Retry() method, that re-calls acquire() on the underlying batch to derive a new conn (possibly to an alternate cluster member). Because of the way the connect-derived interfaces are intertwined, this isn't as clean as I would like it to be, perhaps there's a better way. In either case I'd like to have the conversation.
Thanks!