You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "toxicteddy00077 (via GitHub)" <gi...@apache.org> on 2026/03/03 17:47:31 UTC
[PR] Added is_retriable() to FlussError [fluss-rust]
toxicteddy00077 opened a new pull request, #422:
URL: https://github.com/apache/fluss-rust/pull/422
<!--
*Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss-rust/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #320
<!-- What is the purpose of the change -->
### Description
Added basic `is_retriable()` implementation, similar to Java's RetriableException .
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2880360904
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
Can you point me to where error code for retriable errors are defined on java side?
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #422:
URL: https://github.com/apache/fluss-rust/pull/422
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "fresh-borzoni (via GitHub)" <gi...@apache.org>.
fresh-borzoni commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2908958504
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Mirrors Java's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == CORRUPT_MESSAGE ||
Review Comment:
shall we update docs, btw?
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2888696176
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
STORAGE_EXCEPTION seems to be missing too, can you push a new commit?
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2916012299
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Mirrors Java's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == CORRUPT_MESSAGE ||
Review Comment:
yeah thats why I asked you to have a look. Just wanted to confirm if this was fine. Now I'll make the updates ASAP thanks
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2898887737
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
added :
1. `CorruptMessage`
2. `SchemaNotExist`
3. `CorruptRecordException`
4. `StorageException`
and removed the incorrect ones
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2881984102
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
> I do not see the equivalent Java exceptions for the following (not exhaustive)
>
> * INVALID_COORDINATOR_EXCEPTION
>
> * FENCED_LEADER_EPOCH_EXCEPTION
>
> * RETRIABLE_AUTHENTICATE_EXCEPTION
apart form these three and `FencedTieringEpochException`, the others have been kept similar to Java
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#issuecomment-3992631178
I ran some tests and didnt see any propagation issues, let me know if I missed something
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2880379325
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
I do not see the equivalent Java exceptions for the following (not exhaustive)
- INVALID_COORDINATOR_EXCEPTION
- FENCED_LEADER_EPOCH_EXCEPTION
- RETRIABLE_AUTHENTICATE_EXCEPTION
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2913300156
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Mirrors Java's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == CORRUPT_MESSAGE ||
Review Comment:
have a look and let me know
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "fresh-borzoni (via GitHub)" <gi...@apache.org>.
fresh-borzoni commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2915920495
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Mirrors Java's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == CORRUPT_MESSAGE ||
Review Comment:
@toxicteddy00077 I only see cpp docs updated.
What about rust, python?
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Added is_retriable() to FlussError [fluss-rust]
Posted by "toxicteddy00077 (via GitHub)" <gi...@apache.org>.
toxicteddy00077 commented on code in PR #422:
URL: https://github.com/apache/fluss-rust/pull/422#discussion_r2881972772
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -180,6 +180,18 @@ struct ErrorCode {
static constexpr int INVALID_ALTER_TABLE_EXCEPTION = 56;
/// Deletion operations are disabled on this table.
static constexpr int DELETION_DISABLED_EXCEPTION = 57;
+
+ /// Returns true if retrying the request may succeed. Similar toJava's RetriableException hierarchy.
+ static constexpr bool IsRetriable(int32_t code) {
+ return code == NETWORK_EXCEPTION || code == NOT_LEADER_OR_FOLLOWER ||
Review Comment:
feedback much appreciated,I should checked the fluss source myself. I asked an LLM to enumerate all the exceptions the extend `RetriableException`, but it seems to have given for `ApiException` and others as well. My apologies.
Apart from this having looked at the source myself ,there were a few others i think I should add, such as `CorruptMessageException` and `SchemaNotExistException`. let me know since i think the rest are correct
--
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@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org