Skip to content

HDDS-6354. EC: Fix allocateBlockIfFull condition in ECKeyOutputStream#write()#3117

Closed
kaijchen wants to merge 1 commit intoapache:HDDS-3816-ecfrom
kaijchen:HDDS-6354
Closed

HDDS-6354. EC: Fix allocateBlockIfFull condition in ECKeyOutputStream#write()#3117
kaijchen wants to merge 1 commit intoapache:HDDS-3816-ecfrom
kaijchen:HDDS-6354

Conversation

@kaijchen
Copy link
Copy Markdown
Member

@kaijchen kaijchen commented Feb 21, 2022

What changes were proposed in this pull request?

remLen > 0 will always be true if this while loop ever gets entered.
I think it's intended to be lastCellSize > 0.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6354

How was this patch tested?

N/A

off += ecChunkSize;
iters--;
checkAndWriteParityCells(pos, iters > 0 || remLen > 0);
checkAndWriteParityCells(pos, iters > 0 || lastCellSize > 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a good catch.
LGTM+1

@kaijchen
Copy link
Copy Markdown
Member Author

This patch won't be needed if HDDS-6358(#3120) gets merged.

@umamaheswararao
Copy link
Copy Markdown
Contributor

Thanks @kaijchen for reporting and @guihecheng for the initial review.
Here is my suggestion: Let's review the refactor JIRA first as that will supersede this issue anyway.

@kaijchen
Copy link
Copy Markdown
Member Author

Closed because of #3120

@kaijchen kaijchen closed this Feb 25, 2022
@kaijchen kaijchen deleted the HDDS-6354 branch February 25, 2022 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants