amaliujia commented on code in PR #12230:
URL: https://github.com/apache/ozone/pull/12230#discussion_r4796113405
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -447,9 +447,11 @@ ContainerCommandResponseProto handleStreamInit(
/**
* Handles Create Container Request. If successful, adds the container to
* ContainerSet and sends an ICR to the SCM.
+ *
+ * @param replicationType the {@link ReplicationType} of the pipeline
creating the container.
*/
ContainerCommandResponseProto handleCreateContainer(
- ContainerCommandRequestProto request, KeyValueContainer kvContainer) {
+ ContainerCommandRequestProto request, KeyValueContainer kvContainer,
ReplicationType replicationType) {
Review Comment:
As usual, we keep a `ContainerCommandResponseProto
handleCreateContainer(ContainerCommandRequestProto request, KeyValueContainer
kvContainer)`
which calls `handleCreateContainer(request, kvContainer, Ratis)` to avoids
lots of call site changes?
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/DispatcherContext.java:
##########
@@ -140,11 +142,16 @@ public static Op op(DispatcherContext context) {
return context == null ? Op.NULL : context.getOp();
}
+ public static ReplicationType replicationType(DispatcherContext context) {
+ return context == null ? ReplicationType.RATIS :
context.getReplicationType();
Review Comment:
How about EC containers? AI gives a good hint that EC containers created
through gRPCs will be affected here and get a `ReplicationType.RATIS` because
their context is also null.
Probably EC container does not care about this replication type. But just
leave a note here to make sure it is safe.
--
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]