-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Improve][Connector-V2][ElasticSearch] Improve es bulk sink retriable mechanism #3148
Conversation
public class RetryUtils { | ||
private static final Logger LOG = LoggerFactory.getLogger(RetryUtils.class); |
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.
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.
done.
return null; | ||
}, retryMaterial); | ||
} catch (Exception e) { | ||
throw new RuntimeException("ElasticSearch execute batch statement error", 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.
Please use SeaTunnelException
and we have an issue to discuss the unified Exception define. If you interested in it, you can see #3045.
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.
done.
Please resolve ci problem, thanks. |
c7e2dd8
to
2ec05be
Compare
/** | ||
* An arbitrary absolute maximum practical retry time. | ||
*/ | ||
public static final long MAX_RETRY_TIME_MS = TimeUnit.HOURS.toMillis(1); |
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.
The max retry is 1 hours, it's to long. 1 minutes will be better.
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.
Agree.
The other code is fine. |
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.
LGTM
These code change as bleow:
computeRetryWaitTimeMillis
to compute the wait timeretryWithException
Purpose of this pull request
Check list
New License Guide