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.
This is not as per other branch patches. Why?
There was a problem hiding this comment.
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.
This logic is not same as per branch-2 patches. What is different here? why?
There was a problem hiding this comment.
In order to be compatible with jdk1.7
| @Override | ||
| public void logRollRequested(WALActionsListener.RollRequestReason reason) { | ||
| walNeedsRoll.put(wal, Boolean.TRUE); | ||
| RollController controller = wals.get(wal); |
There was a problem hiding this comment.
I see.. because of jdk 1.7 support, we have to use this way and that is what Findbugs complain.
Reidddddd
left a comment
There was a problem hiding this comment.
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.