Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

RepoMetadataScheduler stops on/after Problems with MongoDB #59

Closed
pluralistix opened this issue May 26, 2015 · 3 comments
Closed

RepoMetadataScheduler stops on/after Problems with MongoDB #59

pluralistix opened this issue May 26, 2015 · 3 comments
Assignees

Comments

@pluralistix
Copy link

We've seen problems with the scheduled metadata-refreshs after having problems (e.g. not talking to master and retries used up) with the underlying MongoDB.

@oli99sc
Copy link
Contributor

oli99sc commented May 26, 2015

I will check the code. To help narrow down the issue, could you pelase provide a stacktrace in the logs which could give a hint about where the problem occured.

@oli99sc
Copy link
Contributor

oli99sc commented May 27, 2015

The RepoMetadataScheduler has a scheduled method which ensures (or tries to) that there is a RepoMetadataGeneratorJob for each scheduled repository. This class keeps track of scheduled jobs in a HashMap. The RepoMetadataGeneratorJobs are scheduled with a fixed delay in a ScheduledExecutorService. Unfortunately the documentation of ScheduledExecutorService says "If any execution of the task encounters an exception, subsequent executions are suppressed."
Temporary problems with the connection to the mongodb instance can leads to an inconsisten state of the HashMap as it still contains jobs, that are no longer executed.

I am now working on a fix

@oli99sc oli99sc self-assigned this May 27, 2015
oli99sc added a commit that referenced this issue May 28, 2015
@oli99sc
Copy link
Contributor

oli99sc commented May 28, 2015

commit includes testcase to reproduce error condition and prove fix helps

@oli99sc oli99sc closed this as completed May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants