Skip to content

Fix NPE in KinesisSupervisor#setupRecordSupplier.#13859

Merged
gianm merged 3 commits intoapache:masterfrom
gianm:fix-kinesis-conf
Feb 28, 2023
Merged

Fix NPE in KinesisSupervisor#setupRecordSupplier.#13859
gianm merged 3 commits intoapache:masterfrom
gianm:fix-kinesis-conf

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Feb 27, 2023

PR #13539 refactored record supplier creation and introduced a bug: this method would throw NPE when recordsPerFetch was not provided by the user. recordsPerFetch isn't needed in this context at all, since the supervisor-side supplier doesn't fetch records. So this patch sets it to zero.

PR apache#13539 refactored record supplier creation and introduced a bug:
this method would throw NPE when recordsPerFetch was not provided
by the user. recordsPerFetch isn't needed in this context at all,
since the supervisor-side supplier doesn't fetch records. So this
patch sets it to zero.
@gianm gianm added Bug AWS Kinesis For changes in Kinesis ingestion labels Feb 27, 2023
Copy link
Copy Markdown
Contributor

@abhishekrb19 abhishekrb19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@abhishekrb19
Copy link
Copy Markdown
Contributor

Not sure why checkstyle is failing with errors in code that's not touched in this PR:

Error:  /home/runner/work/druid/druid/server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java:22:8: Unused import - com.fasterxml.jackson.databind.ObjectMapper. [UnusedImports]
Error:  /home/runner/work/druid/druid/server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java:24:8: Unused import - com.fasterxml.jackson.databind.ObjectMapper. [UnusedImports]

@gianm
Copy link
Copy Markdown
Contributor Author

gianm commented Feb 27, 2023

Not sure why checkstyle is failing with errors in code that's not touched in this PR:

That's an issue with master, will be fixed by #13860. I'll merge that back here when it's committed.

Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion, otherwise LGTM

ioConfig.getAwsExternalId()
),
ioConfig.getRecordsPerFetch(),
0, // no records-per-fetch, it is not used
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase the comment for clarity:

Suggested change
0, // no records-per-fetch, it is not used
0, // need not specify recordsPerFetch as supervisor-side supplier does not fetch records

@gianm gianm merged commit aeb1187 into apache:master Feb 28, 2023
@gianm gianm deleted the fix-kinesis-conf branch February 28, 2023 03:55
@gianm
Copy link
Copy Markdown
Contributor Author

gianm commented Feb 28, 2023

Minor suggestion, otherwise LGTM

Thanks for the review. I merged it to avoid the need to re-run CI; would definitely 👍 a PR improving the comment, though.

@clintropolis clintropolis added this to the 26.0 milestone Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AWS Kinesis For changes in Kinesis ingestion Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants