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

SAMZA-2497: Close MetadataResourceUtil when job is stopped #1333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PanTheMan
Copy link
Contributor

Symptoms: Error message about a Kafka consumer allocated but not closed appears in our log messages
Cause: The MetadataResouceUtil has a Kafka checkpoint manager that is never closed in our code. A LifeCycleAwareConsumer sees this and complains about it.
Fix:: Add a stop in MetadataResourceUtil that will close the checkpoint manager in it. Then have MetadataResourceUtil.stop called everywhere it's used when the job is stopped
Tests: Any job that uses ProcessJob or PassthroughJobCoordinator will see errors in the log files about a Kafka consumer allocated but not closed. With this fix in, that error shouldn't appear

@PanTheMan
Copy link
Contributor Author

@xinyuiscool if you could review this rb

@@ -312,7 +313,7 @@ JobModel readJobModelFromMetadataStore(String zkJobModelVersion) {
@VisibleForTesting
void loadMetadataResources(JobModel jobModel) {
try {
MetadataResourceUtil metadataResourceUtil = createMetadataResourceUtil(jobModel, config);
metadataResourceUtil = createMetadataResourceUtil(jobModel, config);
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is metadataResourceUtil#stop is being stopped for ZkJobCoordinator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants