You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2024/12/09 10:54:27 UTC
[PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
xuzifu666 opened a new pull request, #4668:
URL: https://github.com/apache/paimon/pull/4668
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
1. When execute drop partition or expire partition with large numbers partitions(eg: table with large number of files and stream job with 1 min ckp), would block batch job for overwrite in a long time loop, so add a timeout option for commit retry, user can quick get job result in a specific timeout.
2. FileLength change to 4000 for CoreOption lines was near 3000 which would block code compile.
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877256199
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -166,7 +168,8 @@ public FileStoreCommitImpl(
BucketMode bucketMode,
@Nullable Integer manifestReadParallelism,
List<CommitCallback> commitCallbacks,
- int commitMaxRetries) {
+ int commitMaxRetries,
+ @Nullable Duration commitMaxTimeout) {
Review Comment:
Can you modify all MaxTimeout to Timeout?
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #4668:
URL: https://github.com/apache/paimon/pull/4668
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877312561
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -134,6 +134,7 @@ public class FileStoreCommitImpl implements FileStoreCommit {
private final List<CommitCallback> commitCallbacks;
private final StatsFileHandler statsFileHandler;
private final BucketMode bucketMode;
+ @Nullable private long commitTimeout;
Review Comment:
remove @Nullable
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -166,7 +167,8 @@ public FileStoreCommitImpl(
BucketMode bucketMode,
@Nullable Integer manifestReadParallelism,
List<CommitCallback> commitCallbacks,
- int commitMaxRetries) {
+ int commitMaxRetries,
+ @Nullable long commitTimeout) {
Review Comment:
@Nullable
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -166,7 +167,8 @@ public FileStoreCommitImpl(
BucketMode bucketMode,
@Nullable Integer manifestReadParallelism,
List<CommitCallback> commitCallbacks,
- int commitMaxRetries) {
+ int commitMaxRetries,
+ @Nullable long commitTimeout) {
Review Comment:
remove @Nullable
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce timeout for commit retry avoid long time loop [paimon]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877319523
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -166,7 +167,8 @@ public FileStoreCommitImpl(
BucketMode bucketMode,
@Nullable Integer manifestReadParallelism,
List<CommitCallback> commitCallbacks,
- int commitMaxRetries) {
+ int commitMaxRetries,
+ @Nullable long commitTimeout) {
Review Comment:
Done. Thanks for reminder @JingsongLi
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877068763
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1066,6 +1082,16 @@ public void compactManifest() {
commitMaxRetries));
}
retryCount++;
+
+ if (commitMaxTimeout.isPresent()
Review Comment:
Please merge into `if (retryCount >= commitMaxRetries)`.
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -754,6 +759,16 @@ private int tryCommit(
commitMaxRetries));
}
retryCount++;
+
+ if (commitMaxTimeout.isPresent()
Review Comment:
Please merge into if (retryCount >= commitMaxRetries).
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877067032
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -134,6 +135,7 @@ public class FileStoreCommitImpl implements FileStoreCommit {
private final List<CommitCallback> commitCallbacks;
private final StatsFileHandler statsFileHandler;
private final BucketMode bucketMode;
+ private final Optional<Duration> commitMaxTimeout;
Review Comment:
do not use optional for class member.
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -134,6 +135,7 @@ public class FileStoreCommitImpl implements FileStoreCommit {
private final List<CommitCallback> commitCallbacks;
private final StatsFileHandler statsFileHandler;
private final BucketMode bucketMode;
+ private final Optional<Duration> commitMaxTimeout;
Review Comment:
do not use optional for class member, you can use nullable field here.
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877188175
##########
docs/layouts/shortcodes/generated/core_configuration.html:
##########
@@ -134,6 +134,12 @@
<td>Integer</td>
<td>Maximum number of retries when commit failed.</td>
</tr>
+ <tr>
+ <td><h5>commit.max-timeout</h5></td>
Review Comment:
Make sense,changed to commit.timeout,Thanks~ @JingsongLi
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877185700
##########
docs/layouts/shortcodes/generated/core_configuration.html:
##########
@@ -134,6 +134,12 @@
<td>Integer</td>
<td>Maximum number of retries when commit failed.</td>
</tr>
+ <tr>
+ <td><h5>commit.max-timeout</h5></td>
Review Comment:
max timeout seems weird... it is just timeout?
`commit.timeout`
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Introduce max-timeout for commit retry avoid long time loop [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #4668:
URL: https://github.com/apache/paimon/pull/4668#discussion_r1877256749
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -134,6 +135,7 @@ public class FileStoreCommitImpl implements FileStoreCommit {
private final List<CommitCallback> commitCallbacks;
private final StatsFileHandler statsFileHandler;
private final BucketMode bucketMode;
+ @Nullable private Duration commitMaxTimeout;
Review Comment:
store millis here.
--
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@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org