ChenSammi commented on code in PR #10996:
URL: https://github.com/apache/ozone/pull/10996#discussion_r3763835094
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -1670,12 +1687,14 @@ public void setListMaxSize(int size) {
this.listMaxSize = size;
}
- @VisibleForTesting
- public void setMpuAbortLimitPerTask(int limit) {
- this.mpuAbortLimitPerTask = limit;
+ // Returns the test-injected OzoneTrash if set, otherwise the live instance
+ // from OzoneManager. This is needed because startTrashEmptier() runs after
+ // keyManager.start() in all OzoneManager startup paths, so the field cannot
+ // be populated eagerly in the constructor.
+ private OzoneTrash getEffectiveOzoneTrash() {
+ return ozoneTrash != null ? ozoneTrash : ozoneManager.getOzoneTrash();
}
- @VisibleForTesting
Review Comment:
Can we add back @VisibleForTesting?
--
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]