[KAFKA-161] MongoSourceTask.poll NullPointerException Created: 21/Sep/20 Updated: 02/Jun/22 Resolved: 22/Sep/20 |
|
| Status: | Closed |
| Project: | Kafka Connector |
| Component/s: | Source |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrey B | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
I guess it's because heartbeatManager not creating in com.mongodb.kafka.connect.source.MongoSourceTask#start if shouldCopyData()=true.
Found this error in the last master. |
| Comments |
| Comment by Andrey B [ 22/Sep/20 ] |
|
I've attached a patch which makes testSourceUsesHeartbeatsForOffsets fails with such NullPointerException
Thanks for fix |
| Comment by Ross Lawley [ 22/Sep/20 ] |
|
If possible it would be good to get a a minimal, reproducible example of this error, so I can write a regression test. I'm happy its fixed but it would be nice to have. Thanks again, for all your feedback and for kicking the tires of the forthcoming new connector release. Ross |
| Comment by Ross Lawley [ 22/Sep/20 ] |
|
I couldn't replicate the error and thought that it was caught previously as it aligns when the cursor is closed. However, I've added a defensive block to ensure no NPE's. Ross |
| Comment by Githook User [ 22/Sep/20 ] |
|
Author: {'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}Message: Defensively handle the heartbeat manager Also ensure its reset on restart.
|