You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/07/21 16:06:47 UTC

[GitHub] [ozone] smengcl opened a new pull request, #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

smengcl opened a new pull request, #3613:
URL: https://github.com/apache/ozone/pull/3613

   …ndException back to the caller in order for Recon to fall back to full snapshot
   
   ## What changes were proposed in this pull request?
   
   Recon expects an exception to be thrown in order to fall back to full snapshot when an OM DB delta update cannot be retrieved:
   
   https://github.com/apache/ozone/blob/5ed0e0a9b4c8355f4cde064cc605bc419dacd9c3/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java#L456-L478
   
   However, the current logic implies that `RDBStore#getUpdatesSince` will never throw `SequenceNumberNotFoundException` back to the client (Recon) because it is caught as `IOException` in try-catch. [A patch earlier](https://github.com/apache/ozone/commit/5ed0e0a9b4c8355f4cde064cc605bc419dacd9c3#diff-fee5d70b574d804dcd62230fde7c8456690981673b18a9bc4b48c3fac3e945b8R322) unintentionally broke this intended behavior.
   
   The solution is to restore the intended behavior by explicitly catching `SequenceNumberNotFoundException` and throwing it back to the client.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-7032
   
   ## How was this patch tested?
   
   - [ ] Pending manual testing on a repro cluster.


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on a diff in pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
smengcl commented on code in PR #3613:
URL: https://github.com/apache/ozone/pull/3613#discussion_r926903705


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java:
##########
@@ -322,8 +322,16 @@ public DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount)
         }
         transactionLogIterator.next();
       }
+    } catch (SequenceNumberNotFoundException e) {

Review Comment:
   I believe `SequenceNumberNotFoundException` is the only expected checked exception to be thrown anyway, judging from the method signature:
   
   https://github.com/apache/ozone/blob/946604705cd3a84888f3d189b1938f72f508b664/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java#L280-L281



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] swagle commented on a diff in pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
swagle commented on code in PR #3613:
URL: https://github.com/apache/ozone/pull/3613#discussion_r927057304


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java:
##########
@@ -322,8 +322,16 @@ public DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount)
         }
         transactionLogIterator.next();
       }
+    } catch (SequenceNumberNotFoundException e) {
+      LOG.error("Unable to get delta updates since sequenceNumber {}. "

Review Comment:
   We should log this as a Warning since it is not too serious.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kerneltime commented on pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
kerneltime commented on PR #3613:
URL: https://github.com/apache/ozone/pull/3613#issuecomment-1191709596

   Thanks @smengcl for finding this.


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kerneltime commented on pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFoundException back to the caller in order for Recon to fall back to full snapshot

Posted by GitBox <gi...@apache.org>.
kerneltime commented on PR #3613:
URL: https://github.com/apache/ozone/pull/3613#issuecomment-1192279266

   > Unfortunately the commit message cannot be fixed...
   
   Will keep this in mind. 


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFoundException back to the caller in order for Recon to fall back to full snapshot

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3613:
URL: https://github.com/apache/ozone/pull/3613#issuecomment-1192277021

   Unfortunately the commit message cannot be fixed...


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
smengcl commented on PR #3613:
URL: https://github.com/apache/ozone/pull/3613#issuecomment-1192016125

   > I think we might have to revisit the exception handling here.
   
   Yeah at some point we might want to refactor it.
   
   Thanks @sidseth and @kerneltime for the review.


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kerneltime merged pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
kerneltime merged PR #3613:
URL: https://github.com/apache/ozone/pull/3613


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kerneltime commented on a diff in pull request #3613: HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFou…

Posted by GitBox <gi...@apache.org>.
kerneltime commented on code in PR #3613:
URL: https://github.com/apache/ozone/pull/3613#discussion_r926901841


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java:
##########
@@ -322,8 +322,16 @@ public DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount)
         }
         transactionLogIterator.next();
       }
+    } catch (SequenceNumberNotFoundException e) {

Review Comment:
   Should revert back to throwing all IOExceptions?



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org