HBASE-14977 ChoreService.shutdown may result in ConcurrentModificationException (Vladimir Rodionov)

This commit is contained in:
Enis Soztutar 2015-12-15 11:57:28 -08:00
parent abe30b52a8
commit a4bbc461e3
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ public class ChoreService implements ChoreServicer {
* in the middle of execution will be interrupted and shutdown. This service will be unusable
* after this method has been called (i.e. future scheduling attempts will fail).
*/
public void shutdown() {
public synchronized void shutdown() {
scheduler.shutdownNow();
if (LOG.isInfoEnabled()) {
LOG.info("Chore service for: " + coreThreadPoolPrefix + " had " + scheduledChores.keySet()