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

[edison-jobs] Inconsistencies in job locks #367

Open
mgeissen opened this issue Feb 17, 2022 · 0 comments
Open

[edison-jobs] Inconsistencies in job locks #367

mgeissen opened this issue Feb 17, 2022 · 0 comments

Comments

@mgeissen
Copy link
Member

We found out, that there is some inconsistencies in the lock handling of edison-jobs.

Sometimes we are receiving the following log messages:

  • Clear Lock of Job JobName. Job stopped already
  • Clear Lock of Job JobName. JobID does not exist

Both messages comes from this method in the JobService:

/**
   * Checks all run locks and releases the lock, if the job is stopped.
   *
   * TODO: This method should never do something, otherwise the is a bug in the lock handling.
   * TODO: Check Log files + Remove
   */
  private void clearRunLocks() {
      jobMetaService.runningJobs().forEach((RunningJob runningJob) -> {
          final Optional<JobInfo> jobInfoOptional = jobRepository.findOne(runningJob.jobId);
          if (jobInfoOptional.isPresent() && jobInfoOptional.get().isStopped()) {
              jobMetaService.releaseRunLock(runningJob.jobType);
              LOG.error("Clear Lock of Job {}. Job stopped already.", runningJob.jobType);
          } else if (!jobInfoOptional.isPresent()){
              jobMetaService.releaseRunLock(runningJob.jobType);
              LOG.error("Clear Lock of Job {}. JobID does not exist", runningJob.jobType);
          }
      });
  }

This method is marked with a TODO and says that this should not happen. Currently we have no idea how could that happen. We found out that this happens with the DynamoDB and the MongoDB implementation.

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

No branches or pull requests

1 participant