amaliujia commented on a change in pull request #1725:
URL: https://github.com/apache/ozone/pull/1725#discussion_r548131093
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManagerImpl.java
##########
@@ -275,12 +278,24 @@ public void addContainer(final ContainerInfoProto
containerInfo)
if (!containers.contains(containerID)) {
ExecutionUtil.create(() -> {
- containerStore.put(containerID, container);
+ if (transactionBuffer != null) {
+ containerStore.putWithBatch(
+ transactionBuffer.getCurrentBatchOperation(),
+ containerID, container);
+ } else {
+ containerStore.put(containerID, container);
Review comment:
This is leave for MockHAManager code path in which the buffer is NULL :)
If we choose to update MockHAManager to have a sort of MockBuffer
implementation, then we can move this `else branch` because at that time I
think all existing code will access this buffer.
I can create a JIRA to track that add buffer to MockHAManager and remove
this else :-)
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManagerImpl.java
##########
@@ -275,12 +278,24 @@ public void addContainer(final ContainerInfoProto
containerInfo)
if (!containers.contains(containerID)) {
ExecutionUtil.create(() -> {
- containerStore.put(containerID, container);
+ if (transactionBuffer != null) {
+ containerStore.putWithBatch(
+ transactionBuffer.getCurrentBatchOperation(),
+ containerID, container);
+ } else {
+ containerStore.put(containerID, container);
Review comment:
This is left for MockHAManager code path in which the buffer is NULL :)
If we choose to update MockHAManager to have a sort of MockBuffer
implementation, then we can move this `else branch` because at that time I
think all existing code will access this buffer.
I can create a JIRA to track that add buffer to MockHAManager and remove
this else :-)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]