HDDS-5483. Validate block file length during put block#2463
HDDS-5483. Validate block file length during put block#2463mukul1987 merged 2 commits intoapache:HDDS-4454from
Conversation
There was a problem hiding this comment.
Under what conditions could this be violated?
There was a problem hiding this comment.
@smengcl This is just a safety check. The ozone streaming write path will not use the current ratisAsyncApi which ensures sequential transactions i.e putBlock would always occur after writeChunk. To be on a safer side, this check is added. We may remove this after the complete streaming implementation if this check is redundant
cc : @mukul1987
37ad163 to
e3f9824
Compare
|
Maybe this should rebase on HDDS-4454 |
28191df to
b78221e
Compare
|
@sadanand48 , @mukul1987 , Should this be merged to the master branch instead the HDDS-4454 branch? This dose not look like specific to HDDS-4454. |
|
@sadanand48 , @mukul1987 if there is no objection, I will merge this to the master branch. Thanks. |
|
@szetszwo, sure lets do that |
|
Thanks for the response. Just have merged this to the master branch. |
| if (layoutVersion == FILE_PER_BLOCK && | ||
| // ChunkManagerDummyImpl doesn't persist to disk, don't check here | ||
| !chunkManager.getClass() | ||
| .isAssignableFrom(ChunkManagerDummyImpl.class)) { |
There was a problem hiding this comment.
I think layout-specific code would be better added to each ChunkManager implementation instead of such == and isAssignableFrom checks. Take a look at finishWriteChunks() and shutdown().
Although I don't expect any problems for this specific change, I would prefer going via PR for |
|
@adoroszlai , it is a good idea to have a PR. I will revert the commit from the master. |
|
|
@sadanand48 , as suggested by @adoroszlai , please submit a PR for the master branch. Similar to other JIRAs, we will rebase this to the HDDS-4454 branch after this has been committed to the master branch. Thanks. |
What changes were proposed in this pull request?
Validate block file length during put block .
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5483
How was this patch tested?
Only a validation check.