sodonnel opened a new pull request #3110:
URL: https://github.com/apache/ozone/pull/3110
## What changes were proposed in this pull request?
In ContainerManagerImpl, most of the methods accept a ContainerID object.
This is then converted into `HddsProtos.ContainerID` to pass to
ContainerStateManagerImpl. The data is stored in ContainerStateMap, where it is
all keyed on ContainerID, so the `HddsProtos.ContainerID` has to be converted
back to ContainerID again, which seems wasteful.
There are some methods in the ContainerStateManager interface that are
annotated "@replicate", and they need to continue to passed the ContainerID
Protobuf, but they are few and can be handled as special cases.
There are also some TODO's in the code suggesting it was always the
intention to make this change, but it never happened, eg:
```
@Override
public boolean contains(final HddsProtos.ContainerID id) {
lock.readLock().lock();
try {
// TODO: Remove the protobuf conversion after fixing ContainerStateMap.
return containers.contains(ContainerID.getFromProtobuf(id));
} finally {
lock.readLock().unlock();
}
}
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6334
## How was this patch tested?
Existing tests cover this.
--
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]