Stephen O'Donnell created HDDS-6460:
---------------------------------------
Summary: EC: Adjust requested size by EC DataNum in
WritableECContainerProvider
Key: HDDS-6460
URL: https://issues.apache.org/jira/browse/HDDS-6460
Project: Apache Ozone
Issue Type: Sub-task
Components: SCM
Reporter: Stephen O'Donnell
Assignee: Stephen O'Donnell
In HDDS-6384 we decided that the size tracked in SCM of an EC container is the
usedBytes in the first replica or any parity replica. In
WritableECContainerProvider, we currently check if there is enough space in the
container by comparing the container UsedBytes against the blockSize requested.
However the blockSize needs to be divided by the EC DataNum, as it will be
stripped across blocks in the group. There was a TODO left in the code to
address this decision later:
{code}
ContainerInfo containerInfo = getContainerFromPipeline(pipeline);
// TODO - For EC, what is the block size? If the client says 128MB,
// is that 128MB / 6 (for EC-6-3?)
if (containerInfo == null
|| !containerHasSpace(containerInfo, size)) {
// This is O(n), which isn't great if there are a lot of pipelines
// and we keep finding pipelines without enough space.
existingPipelines.remove(pipeline);
pipelineManager.closePipeline(pipeline, true);
{code}
After the decision in HDDS-6384, we should remove this TODO and divide the
requested size by the dataNum to get the approx space needed in the first
replica to hold the new block.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]