This is an automated email from the ASF dual-hosted git repository.
erose 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 c5998ce76b HDDS-7275. Improve error logging when blocks cannot be
allocated with RATIS THREE. (#5189)
c5998ce76b is described below
commit c5998ce76bea86bda336f2872decbe0537eb0849
Author: SaketaChalamchala <[email protected]>
AuthorDate: Wed Sep 6 10:22:48 2023 -0700
HDDS-7275. Improve error logging when blocks cannot be allocated with RATIS
THREE. (#5189)
---
.../hdds/scm/pipeline/WritableRatisContainerProvider.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableRatisContainerProvider.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableRatisContainerProvider.java
index a113a0cd14..d9474f156d 100644
---
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableRatisContainerProvider.java
+++
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableRatisContainerProvider.java
@@ -80,6 +80,7 @@ public class WritableRatisContainerProvider
*/
ContainerInfo containerInfo = null;
+ String failureReason = null;
//TODO we need to continue the refactor to use repConfig everywhere
//in downstream managers.
@@ -136,11 +137,16 @@ public class WritableRatisContainerProvider
} catch (IOException e) {
LOG.warn("Waiting for one of pipelines {} to be OPEN failed. ",
allocatedPipelineIDs, e);
+ failureReason = "Waiting for one of pipelines to be OPEN failed.
"
+ + e.getMessage();
}
+ } else {
+ failureReason = se.getMessage();
}
} catch (IOException e) {
LOG.warn("Pipeline creation failed for repConfig: {}. "
+ "Retrying get pipelines call once.", repConfig, e);
+ failureReason = e.getMessage();
}
pipelineManager.acquireReadLock();
@@ -166,12 +172,14 @@ public class WritableRatisContainerProvider
}
}
- // we have tried all strategies we know and but somehow we are not able
- // to get a container for this block. Log that info and return a null.
+ // we have tried all strategies we know but somehow we are not able
+ // to get a container for this block. Log that info and throw an exception.
LOG.error(
"Unable to allocate a block for the size: {}, repConfig: {}",
size, repConfig);
- return null;
+ throw new IOException(
+ "Unable to allocate a container to the block of size: " + size
+ + ", replicationConfig: " + repConfig + ". " + failureReason);
}
private List<Pipeline> findPipelinesByState(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]