Skip to content

Commit

Permalink
Updating Sleep Time For Thread to 1 hour
Browse files Browse the repository at this point in the history
  • Loading branch information
aga9900 committed Jan 29, 2025
1 parent 3736b39 commit 40ab7d0
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,8 @@ private DataNodeConfig getDataNodeConfig() {
@Override
public void onPartitionBecomeBootstrapFromOffline(String partitionName) {
try {
if(partitionName == "xyz"){
PartitionStateChangeListener partitionStateChangeListener =
partitionStateChangeListeners.get(StateModelListenerType.FileCopyManagerListener);
partitionStateChangeListener.onPartitionBecomeBootstrapFromOffline(partitionName);
replicaSyncUpManager.waitForFileCopyCompleted(partitionName);
if(partitionName == "146"){
Thread.sleep(3600000);
} else {
// 1. take actions in storage manager (add new replica if necessary)
PartitionStateChangeListener storageManagerListener =
Expand All @@ -883,13 +880,13 @@ public void onPartitionBecomeBootstrapFromOffline(String partitionName) {
statsManagerListener.onPartitionBecomeBootstrapFromOffline(partitionName);
}
}
} catch (InterruptedException e){
logger.error("Bootstrap was interrupted on partition {}", partitionName);
localPartitionAndState.put(partitionName, ReplicaState.ERROR);
throw new StateTransitionException("Bootstrap failed or was interrupted", BootstrapFailure);
} catch (Exception e) {
localPartitionAndState.put(partitionName, ReplicaState.ERROR);
throw e;
try {
throw e;
} catch (InterruptedException ex) {
throw new RuntimeException(ex);
}
}
logger.info("Before setting partition {} to bootstrap", partitionName);
localPartitionAndState.put(partitionName, ReplicaState.BOOTSTRAP);
Expand Down

0 comments on commit 40ab7d0

Please sign in to comment.