You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2018/07/24 18:16:00 UTC
[jira] [Created] (HDDS-288) Fix bugs in OpenContainerBlockMap
Tsz Wo Nicholas Sze created HDDS-288:
----------------------------------------
Summary: Fix bugs in OpenContainerBlockMap
Key: HDDS-288
URL: https://issues.apache.org/jira/browse/HDDS-288
Project: Hadoop Distributed Data Store
Issue Type: Improvement
Reporter: Tsz Wo Nicholas Sze
Assignee: Tsz Wo Nicholas Sze
- OpenContainerBlockMap should not be synchronized for a better performance.
- There is a memory leak in removeContainer(..) -- it sets the entry to null instead of removing it.
- addChunkToMap may add the same chunk twice. See the comments below.
{code}
keyDataSet.putIfAbsent(blockID.getLocalID(), getKeyData(info, blockID)); // (1) when id is absent, it puts
keyDataSet.computeIfPresent(blockID.getLocalID(), (key, value) -> { // (2) now, the id is present, it adds again.
value.addChunk(info);
return value;
});
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org