-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26869 RSRpcServices.scan should deep clone cells when RpcCallCo… #4249
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. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
results.add(cell instanceof ByteBufferExtendedCell ? | ||
KeyValueUtil.copyToNewKeyValue(cell) : cell); | ||
results.add( | ||
CellUtil.cloneIfNecessary(cell)); |
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.
one line is ok
addScannerLeaseBack(lease); | ||
// If context is null,we call rsh.shippedCallback directly to release the | ||
// internal resources in rsh. | ||
runShippedCallback(rsh); |
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.
The issue here is scanner closed too early then the result bytebuffer might be overwritten. I think the scanner resources are released and lease is added back too, so is it necessary to change codes here?And if there is no rpc call context here, is it a little strange to run a kind of RpcCallBack?
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.
Oh, it also fixed the scanner leak problem caused by the null context and partial results. LGTM.
Please fix the check style issue. |
…ntext is null