You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/01/06 21:53:17 UTC
[GitHub] [ozone] adoroszlai commented on a change in pull request #1730: HDDS-4619. Intermittent error exporting same container to multiple datanodes
adoroszlai commented on a change in pull request #1730:
URL: https://github.com/apache/ozone/pull/1730#discussion_r552979214
##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
##########
@@ -516,22 +516,36 @@ public void importContainerData(InputStream input,
@Override
public void exportContainerData(OutputStream destination,
ContainerPacker<KeyValueContainerData> packer) throws IOException {
- // Closed/ Quasi closed containers are considered for replication by
- // replication manager if they are under-replicated.
- ContainerProtos.ContainerDataProto.State state =
- getContainerData().getState();
- if (!(state == ContainerProtos.ContainerDataProto.State.CLOSED ||
- state == ContainerDataProto.State.QUASI_CLOSED)) {
- throw new IllegalStateException(
- "Only closed/quasi closed containers could be exported: " +
- "Where as ContainerId="
- + getContainerData().getContainerID() + " is in state " + state);
+ readLock();
Review comment:
Agreed, the first read lock can be removed. I think we need to keep the second one, though (for `packer.pack()`).
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org