Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@ public void updatePipelineState(
HddsProtos.PipelineID pipelineIDProto, HddsProtos.PipelineState newState)
throws IOException {
PipelineID pipelineID = PipelineID.getFromProtobuf(pipelineIDProto);
Pipeline.PipelineState oldState = null;
lock.writeLock().lock();
try {
oldState = getPipeline(pipelineID).getPipelineState();
// null check is here to prevent the case where SCM store
// is closed but the staleNode handlers/pipeline creations
// still try to access it.
Expand All @@ -276,8 +274,7 @@ public void updatePipelineState(
+ " may have been deleted already.", pipelineID);
} catch (IOException ex) {
LOG.warn("Pipeline {} state update failed", pipelineID);
Comment thread
JacksonYao287 marked this conversation as resolved.
Outdated
// revert back to old state in memory
pipelineStateMap.updatePipelineState(pipelineID, oldState);
throw ex;
} finally {
lock.writeLock().unlock();
}
Expand Down