[enhancement](bulk-load) strict second level granularity for timeout between (0,1) (#29028)

This commit is contained in:
Siyang Tang
2023-12-29 23:44:43 +08:00
committed by GitHub
parent 989d20e0ac
commit 2518ed64ea

View File

@ -160,7 +160,8 @@ public class LoadLoadingTask extends LoadTask {
if (leftTimeMs <= 0) {
throw new LoadException("failed to execute loading task when timeout");
}
int timeoutS = (int) (leftTimeMs / 1000);
// 1 second is the minimum granularity of actual execution
int timeoutS = Math.max((int) (leftTimeMs / 1000), 1);
curCoordinator.setTimeout(timeoutS);
try {