Skip to content

Commit

Permalink
fix stop load bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wudi committed Nov 21, 2023
1 parent 65e1a14 commit 1911b2d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,15 @@ public Collection<DorisCommittable> prepareCommit() throws IOException, Interrup
}
// disable exception checker before stop load.
globalLoading = false;
// clean loadingMap
loadingMap.clear();

// submit stream load http request
List<DorisCommittable> committableList = new ArrayList<>();
for(Map.Entry<String, DorisStreamLoad> streamLoader : dorisStreamLoadMap.entrySet()){
String tableIdentifier = streamLoader.getKey();
if(!loadingMap.getOrDefault(tableIdentifier, false)){
LOG.debug("skip table {}, no data need to load.", tableIdentifier);
continue;
}
DorisStreamLoad dorisStreamLoad = streamLoader.getValue();
LabelGenerator labelGenerator = getLabelGenerator(tableIdentifier);
String currentLabel = labelGenerator.generateTableLabel(curCheckpointId);
Expand All @@ -229,6 +231,8 @@ public Collection<DorisCommittable> prepareCommit() throws IOException, Interrup
committableList.add(new DorisCommittable(dorisStreamLoad.getHostPort(), dorisStreamLoad.getDb(), txnId));
}
}
// clean loadingMap
loadingMap.clear();
return committableList;
}

Expand Down

0 comments on commit 1911b2d

Please sign in to comment.