-
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-26106 AbstractFSWALProvider#getArchivedLogPath doesn't look for wal file in all oldWALs directory. #3636
Conversation
… wal file in all oldWALs directory.
* @param conf configuration | ||
* @return WAL Reader instance | ||
*/ | ||
public static org.apache.hadoop.hbase.wal.WAL.Reader openReader(Path path, Configuration conf) |
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.
This method is not called anywhere so removing it.
} | ||
|
||
// For HBASE-15019 | ||
private static void recoverLease(final Configuration conf, final Path path) { |
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.
This method is not called anywhere so removing it.
💔 -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. |
OK, so the methods are used in other modules, like hbase-mapreduce? |
Yes, somehow Intellij was misleading me. Fixed it in last version. |
assertTrue(fs.rename(logFile, archivedLogLocation)); | ||
assertTrue(fs.exists(archivedLogDir)); | ||
assertFalse(fs.exists(logFile)); | ||
// TODO: This is not behaving as expected. WALInputFormat#WALKeyRecordReader doesn't open |
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.
This test is not testing what it is intending to.
Before this patch, it was using AbstractFSWALProvider.getArchivedLogPath(logFile, conf);
to get archivedLogLocation
. But AbstractFSWALProvider#getArchivedLogPath
was returning the same path as logFile
from here
After this patch, we are able to successfully rename the file to oldWALs directory but somehow it is not triggering the condition within nextKeyValue method to look into archiveDir.
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.
So you mean we should file another issue to address this? Anyway, I think this PR is a critical one as it could cause data loss, so let me merge it to all branches first in case of not blocking the upcoming 2.4.x release.
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 was going to cut 2.4.6RC0 today but saw this issue. Will wait until this is merged to branch-2.4.
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.
So you mean we should file another issue to address this
Yes, we need to open a new jira to modify the test. Will file it soon.
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 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@Apache9 Could you please review again ? Thank you ! |
🎊 +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. |
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java
Outdated
Show resolved
Hide resolved
I left a 'Changes Requested' review but if the comment is addressed at commit time we don't need another round of review from me. |
🎊 +1 overall
This message was automatically generated. |
Please fix the checkstyle issue? Thanks. |
Fixed. It was a new warning after I removed file comparison. |
🎊 +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. |
… wal file in all oldWALs directory. (#3636) Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org> Conflicts: hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALRecordReader.java
… wal file in all oldWALs directory. (#3636) Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org> Conflicts: hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALRecordReader.java
… wal file in all oldWALs directory. (apache#3636)
No description provided.