You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/03/10 18:17:40 UTC

[GitHub] [accumulo] jzgithub1 opened a new pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

jzgithub1 opened a new pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556
 
 
   CLOSED and UNREFERENCE WALS (not OPEN) causing open == 0

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556#discussion_r390654546
 
 

 ##########
 File path: test/src/main/java/org/apache/accumulo/test/functional/ManyWriteAheadLogsIT.java
 ##########
 @@ -198,16 +198,33 @@ public void testMany() throws Exception {
   }
 
   private void addOpenWals(ServerContext c, Set<String> allWalsSeen) throws Exception {
-    Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
-    Set<Entry<String,WalState>> es = wals.entrySet();
+
     int open = 0;
-    for (Entry<String,WalState> entry : es) {
-      if (entry.getValue() == WalState.OPEN) {
-        open++;
-        allWalsSeen.add(entry.getKey());
+    int attempts = 0;
+    boolean foundWal = false;
+
+    while (open == 0) {
+      attempts++;
+      Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
+      Set<Entry<String,WalState>> es = wals.entrySet();
+      for (Entry<String,WalState> entry : es) {
+        if (entry.getValue() == WalState.OPEN) {
+          open++;
+          allWalsSeen.add(entry.getKey());
+          foundWal = true;
+        } else {
+          log.error("The WalState is " + entry.getValue());// CLOSED or UNREFERENCED
+        }
+      }
+
+      if (!foundWal) {
+        Thread.sleep(50);
+        if (attempts % 50 == 0)
+          log.info("Has not found an open WAL in " + attempts + " attempts.");
       }
     }
 
+    log.debug("It took " + attempts + " attempt(s) to find an open WAL");
 
 Review comment:
   ```suggestion
       log.debug("It took {} attempt(s) to find {} open WALs", attempts, open);
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556#discussion_r390654831
 
 

 ##########
 File path: test/src/main/java/org/apache/accumulo/test/functional/ManyWriteAheadLogsIT.java
 ##########
 @@ -198,16 +198,33 @@ public void testMany() throws Exception {
   }
 
   private void addOpenWals(ServerContext c, Set<String> allWalsSeen) throws Exception {
-    Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
-    Set<Entry<String,WalState>> es = wals.entrySet();
+
     int open = 0;
-    for (Entry<String,WalState> entry : es) {
-      if (entry.getValue() == WalState.OPEN) {
-        open++;
-        allWalsSeen.add(entry.getKey());
+    int attempts = 0;
+    boolean foundWal = false;
+
+    while (open == 0) {
+      attempts++;
+      Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
+      Set<Entry<String,WalState>> es = wals.entrySet();
+      for (Entry<String,WalState> entry : es) {
+        if (entry.getValue() == WalState.OPEN) {
+          open++;
+          allWalsSeen.add(entry.getKey());
+          foundWal = true;
+        } else {
+          log.error("The WalState is " + entry.getValue());// CLOSED or UNREFERENCED
+        }
+      }
+
+      if (!foundWal) {
+        Thread.sleep(50);
+        if (attempts % 50 == 0)
+          log.info("Has not found an open WAL in " + attempts + " attempts.");
 
 Review comment:
   ```suggestion
             log.debug("No open WALs found in {} attempts.", attempts);
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [accumulo] jzgithub1 commented on issue #1556: Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

Posted by GitBox <gi...@apache.org>.
jzgithub1 commented on issue #1556: Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556#issuecomment-598249723
 
 
   @ctubbsii ,  I accepted the requested changes.  I think we are done here.  Let me know if there is anything else you want me to do.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [accumulo] ctubbsii merged pull request #1556: Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

Posted by GitBox <gi...@apache.org>.
ctubbsii merged pull request #1556: Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1556: WIP - Fixes #1488 - ManyWriteAheadLogsIT asserts open WALS equal to zero.
URL: https://github.com/apache/accumulo/pull/1556#discussion_r390655207
 
 

 ##########
 File path: test/src/main/java/org/apache/accumulo/test/functional/ManyWriteAheadLogsIT.java
 ##########
 @@ -198,16 +198,33 @@ public void testMany() throws Exception {
   }
 
   private void addOpenWals(ServerContext c, Set<String> allWalsSeen) throws Exception {
-    Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
-    Set<Entry<String,WalState>> es = wals.entrySet();
+
     int open = 0;
-    for (Entry<String,WalState> entry : es) {
-      if (entry.getValue() == WalState.OPEN) {
-        open++;
-        allWalsSeen.add(entry.getKey());
+    int attempts = 0;
+    boolean foundWal = false;
+
+    while (open == 0) {
+      attempts++;
+      Map<String,WalState> wals = WALSunnyDayIT._getWals(c);
+      Set<Entry<String,WalState>> es = wals.entrySet();
+      for (Entry<String,WalState> entry : es) {
+        if (entry.getValue() == WalState.OPEN) {
+          open++;
+          allWalsSeen.add(entry.getKey());
+          foundWal = true;
+        } else {
+          log.error("The WalState is " + entry.getValue());// CLOSED or UNREFERENCED
 
 Review comment:
   The formatter will reform that line, and possibly others. Try running `mvn clean verify -DskipTests` on this branch to run the code formatter, and to check for other style issues.
   
   ```suggestion
             log.debug("The WalState for {} is {}", entry.getKey(), entry.getValue()); // CLOSED or UNREFERENCED
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services