-
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-24849 Branch-1 Backport : HBASE-24665 MultiWAL : Avoid rolling of ALL WALs when one of the WAL needs a roll #2194
Conversation
branch-1 also had issue with precommit QA. This is fixed now. Can u pls do a commit (new line or so) to trigger QA |
💔 -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. |
public byte[][] rollWal(long now) throws IOException { | ||
this.lastRollTime = now; | ||
byte[][] regionsToFlush = wal.rollWriter(true); | ||
this.rollRequest.set(false); |
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 is not as per other branch patches. Why?
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 order to be consistent with the previous
boolean periodic = false; | ||
for (RollController controller : wals.values()) { | ||
if (controller.needsPeriodicRoll(now)) { | ||
periodic = true; | ||
break; | ||
} | ||
} |
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 logic is not same as per branch-2 patches. What is different here? why?
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 order to be compatible with jdk1.7
wal.registerWALActionsListener(new WALActionsListener.Base() { | ||
@Override | ||
public void logRollRequested(WALActionsListener.RollRequestReason reason) { | ||
walNeedsRoll.put(wal, Boolean.TRUE); | ||
RollController controller = wals.get(wal); |
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 see.. because of jdk 1.7 support, we have to use this way and that is what Findbugs complain.
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.
Can we use EnvironmentEdgeManager.currentTime() instead of System.currentTimeMillis()
One question, i don't get the solution, why this change can avoid all wals roll? |
There should be one key point in old version which leads to all WALs rolled, can you point that out. |
💔 -1 overall
This message was automatically generated. |
Please take a look at the |
I read @anoopsjohn's comment. If we can make sure the |
💔 -1 overall
This message was automatically generated. |
@Reidddddd In old version, it is not judged which wal triggered before roll, and all wals use the same roll period. |
Let's wait for QA |
can use this SuppressWarnings, with value and justification.
|
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
We are cool now, thx for the contribution, this is nice @WenFeiYi |
…of ALL WALs when one of the WAL needs a roll (apache#2194) Signed-off-by: Reid Chan <reidchan@apache.org> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
No description provided.