This is an automated email from the ASF dual-hosted git repository.
siyao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 9186e6b HDDS-5529. For any IOexception from @Replicated method we
should throw it (#2788)
9186e6b is described below
commit 9186e6b2950773faf0db7b08b4b556f8e1a9e58a
Author: Jackson Yao <[email protected]>
AuthorDate: Wed Feb 2 08:59:23 2022 +0800
HDDS-5529. For any IOexception from @Replicated method we should throw it
(#2788)
---
.../apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
index 9589eb9..0b93f4d 100644
---
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
+++
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java
@@ -258,10 +258,8 @@ public class PipelineStateManagerImpl implements
PipelineStateManager {
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.
@@ -275,9 +273,8 @@ public class PipelineStateManagerImpl implements
PipelineStateManager {
LOG.warn("Pipeline {} is not found in the pipeline Map. Pipeline"
+ " may have been deleted already.", pipelineID);
} catch (IOException ex) {
- LOG.warn("Pipeline {} state update failed", pipelineID);
- // revert back to old state in memory
- pipelineStateMap.updatePipelineState(pipelineID, oldState);
+ LOG.error("Pipeline {} state update failed", pipelineID);
+ throw ex;
} finally {
lock.writeLock().unlock();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]