HDDS-1754. getContainerWithPipeline fails with PipelineNotFoundException. Contributed by Supratim Deka (#1081)
This commit is contained in:
parent
00dd843a1a
commit
738fab3bff
@ -467,4 +467,12 @@ public boolean isOpen() {
|
||||
return state == HddsProtos.LifeCycleState.OPEN
|
||||
|| state == HddsProtos.LifeCycleState.CLOSING;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a container is in Open state, but Close has not been initiated.
|
||||
* @return true if Open, false otherwise.
|
||||
*/
|
||||
public boolean isOpenNotClosing() {
|
||||
return state == HddsProtos.LifeCycleState.OPEN;
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ public ContainerWithPipeline getContainerWithPipeline(long containerID)
|
||||
getContainer(id);
|
||||
final Pipeline pipeline;
|
||||
|
||||
if (container.isOpen()) {
|
||||
if (container.isOpenNotClosing()) {
|
||||
// Ratis pipeline
|
||||
pipeline = scm.getPipelineManager()
|
||||
.getPipeline(container.getPipelineID());
|
||||
|
Loading…
Reference in New Issue
Block a user