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
HDDS-7032. RDBStore#getUpdatesSince should throw SequenceNumberNotFoundException back to the caller in order for Recon to fall back to full snapshot #3613
Conversation
…ndException back to the caller in order for Recon to fall back to full snapshot Change-Id: I6e90b47f28d963a458572e8cd2de879619fc423b
Thanks @smengcl for finding this. |
@@ -322,8 +322,16 @@ public DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount) | |||
} | |||
transactionLogIterator.next(); | |||
} | |||
} catch (SequenceNumberNotFoundException e) { |
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.
Should revert back to throwing all IOExceptions?
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 believe SequenceNumberNotFoundException
is the only expected checked exception to be thrown anyway, judging from the method signature:
ozone/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java
Lines 280 to 281 in 9466047
public DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount) | |
throws SequenceNumberNotFoundException { |
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java
Outdated
Show resolved
Hide resolved
Change-Id: Ic40e547c2f547f85460a0c256ea08eca1af9aada
…ch can circumvent the existing throw SNNFE logic below. Tested on a cluster. Change-Id: Ica660650d0e2cd54f01215fbdd5b8af30d0e1e26
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.
+1
Change-Id: I6b5c2804328df6522a6a6838d9935ec71f59130a
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 think we might have to revisit the exception handling here.
Yeah at some point we might want to refactor it. Thanks @swagle and @kerneltime for the review. |
Unfortunately the commit message cannot be fixed... |
Will keep this in mind. |
…NumberNotFou… (apache#3613) (cherry picked from commit c57c9bc) Change-Id: I7fe61567a1c7e49c5c34cbe2225a5fab1ef2e597
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:
ozone/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java
Lines 456 to 478 in 5ed0e0a
However, the current logic implies that
RDBStore#getUpdatesSince
will never throwSequenceNumberNotFoundException
back to the client (Recon) because it is caught asIOException
in try-catch. A patch earlier unintentionally caused the regression.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?