-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-22965 RS Crash due to DBE reference to an reused ByteBuff #603
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ | |
package org.apache.hadoop.hbase.io.encoding; | ||
|
||
import org.apache.hadoop.hbase.Cell; | ||
import org.apache.hadoop.hbase.KeyValueUtil; | ||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* Keeps track of the encoding state. | ||
*/ | ||
|
@@ -31,4 +31,12 @@ public class EncodingState { | |
* The previous Cell the encoder encoded. | ||
*/ | ||
protected Cell prevCell = null; | ||
|
||
public void beforeShipped() { | ||
if (this.prevCell != null) { | ||
// can't use KeyValueUtil#toNewKeyCell, because we need both key and value | ||
// from the prevCell in FastDiffDeltaEncoder | ||
this.prevCell = KeyValueUtil.copyToNewKeyValue(this.prevCell); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems we need both key and value from the prevCell in FastDiffDeltaEncoder and all. Just add a comment saying so. Normally we copy the key part alone in beforeShipped There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done it |
||
} | ||
} | ||
} |
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.
Why not making it ShipperListener. That would be best
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.
If do so, we should move ShipperListener to hbase-common first