-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-27644 Should not return false when WALKey has no following KVs … #5032
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. |
🎊 +1 overall
This message was automatically generated. |
LOG.trace("WALKey has no KVs that follow it; trying the next one. current offset={}", | ||
this.inputStream.getPos()); |
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.
Wow, that's a big one. When I saw dataloss explanation, I wanted to check for logs WALKey has no KVs that follow it; trying the next one.
to see how many, if at all num of such references we see but then realized it is at TRACE level. Shall we make it at least DEBUG level?
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.
I'm OK with changing it to DEBUG, can file a new issue?
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.
Sounds good
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 I thought this was a PR which has already been merged so I said we can file a new issue for this...
Let me change the log level and update the PR...
@@ -410,8 +410,7 @@ protected boolean readNext(Entry entry) throws IOException { | |||
if (!walKey.hasFollowingKvCount() || 0 == walKey.getFollowingKvCount()) { | |||
LOG.trace("WALKey has no KVs that follow it; trying the next one. current offset={}", | |||
this.inputStream.getPos()); | |||
seekOnFs(originalPosition); | |||
return false; | |||
return true; |
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.
For the core change, I wonder if it might still be possible to have replication delays with specific encryption as explained on HBASE-20604.
(though possible dataloss during WAL splitting is definitely much serious case to consider)
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.
In general I do not think a partial data can cause the protobuf message to have wrong field values, it will just fail the parsing of the WALKey message and we will return earlier. So if we can successfully parse the WALKey message, and the following kv count is 0, it means that the kv count is 0 when writting, it does not mean the kv data is not available yet...
If this is not the case, then I think it should be a serious bug of CryptoInputStream, as it may return incorrect bytes...
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.
Yeah that is quite reasonable.
…while reading WAL file
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…while reading WAL file (#5032) Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit 4a9cf99) Conflicts: hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java
…while reading WAL file (#5032) Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit 4a9cf99) Conflicts: hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java
…while reading WAL file (#5032) Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit 4a9cf99)
…while reading WAL file (apache#5032) Signed-off-by: Viraj Jasani <[email protected]> (cherry picked from commit 4a9cf99) Conflicts: hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java (cherry picked from commit 22093cb) Change-Id: I77cda7c09a46b031848f637edfa09951ce512a7f
…while reading WAL file