bsglz commented on a change in pull request #1737:
URL: https://github.com/apache/hbase/pull/1737#discussion_r436490171



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractWALRoller.java
##########
@@ -180,18 +181,18 @@ public void run() {
           WAL wal = entry.getKey();
           // reset the flag in front to avoid missing roll request before we 
return from rollWriter.
           walNeedsRoll.put(wal, Boolean.FALSE);
-          byte[][] regionsToFlush = null;
+          Map<byte[], List<byte[]>> regionsToFlush = null;
           try {
             // Force the roll if the logroll.period is elapsed or if a roll 
was requested.
-            // The returned value is an array of actual region names.
+            // The returned value is an collection of actual region and family 
names.
             regionsToFlush = wal.rollWriter(periodic || 
entry.getValue().booleanValue());
           } catch (WALClosedException e) {
             LOG.warn("WAL has been closed. Skipping rolling of writer and just 
remove it", e);
             iter.remove();
           }
           if (regionsToFlush != null) {
-            for (byte[] r : regionsToFlush) {
-              scheduleFlush(Bytes.toString(r));
+            for (Map.Entry<byte[], List<byte[]>> r : 
regionsToFlush.entrySet()) {

Review comment:
       I understand your concern, but i think the test is enough, and we just 
change the behavier when families is not null, and it will only comes from 
logRoller, and it only could be happend when wals is too many.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to