Copilot commented on code in PR #9255:
URL: https://github.com/apache/ozone/pull/9255#discussion_r2497626078
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLifecycleConfiguration.java:
##########
@@ -56,6 +54,7 @@ public static Codec<OmLifecycleConfiguration> getCodec() {
public static final int LC_MAX_RULES = 1000;
private final String volume;
private final String bucket;
+ private long bucketObjectID = -1L;
Review Comment:
The field `bucketObjectID` should be marked as `final` and initialized
through the constructor. The current implementation with a setter method
violates immutability principles and makes the class susceptible to being
modified after construction, which can lead to thread-safety issues. If
mutability is required, consider documenting why the `@Immutable` annotation
was removed and the implications for thread safety.
```suggestion
private final long bucketObjectID;
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]