Apache9 commented on a change in pull request #2890:
URL: https://github.com/apache/hbase/pull/2890#discussion_r560042891
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -1500,11 +1499,9 @@ private void switchSnapshotCleanup(final boolean on) {
try {
snapshotCleanupTracker.setSnapshotCleanupEnabled(on);
if (on) {
- if (!getChoreService().isChoreScheduled(this.snapshotCleanerChore)) {
- getChoreService().scheduleChore(this.snapshotCleanerChore);
- }
+ getChoreService().scheduleChore(this.snapshotCleanerChore);
} else {
- getChoreService().cancelChore(this.snapshotCleanerChore);
+ this.snapshotCleanerChore.cancel();
Review comment:
I do not think it could be null here? This method is called inside the
switchSnapshotCleanup method above and it could call synchronized on the
snapshotCleanerChore instance...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]