[fix](split) remove retry when fetch split batch failed (#37637)

bp: #37636
This commit is contained in:
Ashin Gau
2024-07-12 22:46:03 +08:00
committed by GitHub
parent 019cd9b4ec
commit 20758576b2
2 changed files with 8 additions and 9 deletions

View File

@ -56,14 +56,8 @@ Status RemoteSplitSourceConnector::get_next(bool* has_next, TFileRangeDesc* rang
TFetchSplitBatchResult result;
try {
coord->fetchSplitBatch(result, request);
} catch (std::exception& e1) {
LOG(WARNING) << "Failed to get batch of split source: {}, try to reopen" << e1.what();
RETURN_IF_ERROR(coord.reopen());
try {
coord->fetchSplitBatch(result, request);
} catch (std::exception& e2) {
return Status::IOError("Failed to get batch of split source: {}", e2.what());
}
} catch (std::exception& e) {
return Status::IOError<false>("Failed to get batch of split source: {}", e.what());
}
_last_batch = result.splits.empty();
_scan_ranges = result.splits;

View File

@ -61,7 +61,12 @@ public class SplitSourceManager extends MasterDaemon {
}
public SplitSource getSplitSource(long uniqueId) {
return splits.get(uniqueId).get();
WeakReference<SplitSource> ref = splits.get(uniqueId);
if (ref == null) {
return null;
} else {
return ref.get();
}
}
@Override