Skip to content

Cassandra diff should accept a provided job_id for retrying diffs #16

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

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

Conversation

jyothsnakonisa
Copy link
Contributor

This Pull Request fixes two bugs that surfaced during retrying diff jobs with same JobId.

  1. The try resource block in DiffJob.java closes the session object before the code in exception or finally block gets executed. We are marking the job as not running in the exception block which throws an exception as the session object is already closed. Chaning the resource try catch block to try catch finally block so that session object will not be closed until cleanup is complete.
  2. When job_id is passed as a config property for the first time, we will not have metadata associated with job_id in metadata table but the current code attempts to get the job metadata for the passed jobId and as those details will not be present, a null pointer exception is thrown. This Pr fixes this issue by getting jobParameters from the table only when they are available otherwise creates new job parameters with passed JobId or random UUID.

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.

1 participant