Apache9 commented on code in PR #5032:
URL: https://github.com/apache/hbase/pull/5032#discussion_r1113905186
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java:
##########
@@ -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;
Review Comment:
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...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]