You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2026/02/09 08:01:49 UTC
Re: [PR] HDDS-14377. Refactor OmLifecycleConfiguration#Builder [ozone]
ChenSammi commented on code in PR #9688:
URL: https://github.com/apache/ozone/pull/9688#discussion_r2781155025
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/lifecycle/OMLifecycleConfigurationSetRequest.java:
##########
@@ -148,9 +148,16 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, Execut
OmLifecycleConfiguration.Builder lcBuilder =
OmLifecycleConfiguration.getBuilderFromProtobuf(lifecycleConfiguration);
lcBuilder.setUpdateID(transactionLogIndex);
- OmLifecycleConfiguration omLifecycleConfiguration =
- lcBuilder.setBucketObjectID(bucketInfo.getObjectID()).build();
- omLifecycleConfiguration.valid();
+ OmLifecycleConfiguration omLifecycleConfiguration;
+ try {
+ omLifecycleConfiguration =
+ lcBuilder.setBucketObjectID(bucketInfo.getObjectID()).build();
+ } catch (IllegalArgumentException e) {
+ if (e.getCause() instanceof OMException) {
Review Comment:
Let's add a e.getCause() null check here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org