-
Notifications
You must be signed in to change notification settings - Fork 192
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
Prevent context update after/while rebalancing #161
Conversation
This call might have been needed before, but it is no longer required
@mtagle IIRC we chatted about this a while back and decided the method was basically useless at this point and safe to remove, right? |
Codecov Report
@@ Coverage Diff @@
## master #161 +/- ##
============================================
+ Coverage 65.1% 65.19% +0.09%
+ Complexity 238 237 -1
============================================
Files 33 33
Lines 1367 1362 -5
Branches 130 130
============================================
- Hits 890 888 -2
+ Misses 439 437 -2
+ Partials 38 37 -1
|
I wonder if the bug is not necessarily that the connector is attempting to manage the offsets, but how it is doing it. The But if it is desired that the connector track its own offsets, then it should use the A connector can, however, override |
@criccomini @mtagle @jgao54 ping :) |
:looking: |
Based on what @rhauch is saying, I think we want to override preCommit(). Reason being is that we need to have flushes (when we guarantee writes to BQ are done successfully) fully finished before we commit our offsets. As such, I think we should do:
|
Talked with @mtagle about this a bit more. It actually sounds like we don't need to manage the offsets ourselves since we apparently fully flush all messages (or time out on flush) before returning. As such, I think we can offload the work to Kafka connect. The PR should suffice then. Going to let @mtagle confirm before merging. |
(Also, planning to release in the next 2 weeks) |
As far as I can tell, KCBQ should not need to keep track of it's own offsets, at least if it's just doing normal BQ streaming. .flush() makes sure that all the rows that we've been given have been successfully to BigQuery before it returns. (Going through GCS is a little bit more complicated but after .flush() completes successfully you can at least be sure that the data has reached GCS. Since GCS loading is technically in beta this is something I feel comfortable with.) So, with that being said I'm totally happy to get rid of this method, and I believe it is safe to do so. |
Thanks @mtagle @criccomini! |
This call might have been needed before, but it is no longer required
This call might have been needed before, but it is no longer required
Hi,
This method leads to the context being updated with previously assigned partitions, and to a fatal error of trying to seek to a "no longer assigned partition".
Reproduction can be done by submitting a BQ connector with one task, and update that same connector to use 5 tasks for instance.
It really often ends up with the first created task to fail with that exception :
I was able to load in BigQuery millions of records with that fix, while killing the connector, adding and removing tasks while still not loose any records.
Could you please double check that behavior and merge that PR ?
Have a good day
Nicolas