devmadhuu commented on code in PR #10928:
URL: https://github.com/apache/ozone/pull/10928#discussion_r3703620354
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/PendingContainerTracker.java:
##########
@@ -148,6 +162,24 @@ synchronized boolean remove(ContainerID containerID) {
synchronized int getCount() {
return currentWindow.size() + previousWindow.size();
}
+
+ /**
+ * Count pending containers of the given storage type.
+ */
+ synchronized int getCount(StorageType storageType) {
Review Comment:
There might be a possibility of having legacy containers where they were not
tagged with tier type. If a datanode simultaneously contains a legacy (non
tier) pipeline (recorded with null) and a DISK pipeline, a DISK space check
(getCount(DISK)) will not count the null-typed pending even though it may
physically occupy a DISK volume. Are we fine with this gap of overestimating
space in this case ?
--
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]