-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDDS-1666. Issue in openKey when allocating block. #943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
0450e44
to
489d0bf
Compare
💔 -1 overall
This message was automatically generated. |
489d0bf
to
38ce537
Compare
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM
We set size as below
final long size = args.getDataSize() >= 0 ?
args.getDataSize() : scmBlockSize;
and create OmKeyInfo with below size set. But when allocating Block for openKey, we use as below.
allocateBlockInKey(keyInfo, args.getDataSize(), currentTime);
I feel here, we should use size which is set above so that we allocate at least a block when the openKey call happens.
Current Code also works fine, but for readability I believe this should be good.