EmmyMiao87 commented on a change in pull request #2241: Fix some bugs about load label URL: https://github.com/apache/incubator-doris/pull/2241#discussion_r348266093
########## File path: fe/src/main/java/org/apache/doris/load/loadv2/LoadManager.java ########## @@ -135,23 +135,17 @@ public long createLoadJobFromMiniLoad(TMiniLoadBeginRequest request) throws User LoadJob loadJob = null; writeLock(); try { - checkLabelUsed(database.getId(), request.getLabel(), request.getRequest_id()); + // checkLabelUsed(database.getId(), request.getLabel(), request.getRequest_id()); loadJob = new MiniLoadJob(database.getId(), request); - createLoadJob(loadJob); + // call unprotectedExecute before adding load job. so that if job is not started ok, no need to add // Mini load job must be executed before release write lock. // Otherwise, the duplicated request maybe get the transaction id before transaction of mini load is begun. loadJob.unprotectedExecute(); - } catch (DuplicatedRequestException e) { - LOG.info(new LogBuilder(LogKey.LOAD_JOB, e.getDuplicatedRequestId()) - .add("msg", "the duplicated request returns the txn id " - + "which was created by the same mini load") - .build()); - return dbIdToLabelToLoadJobs.get(database.getId()).get(request.getLabel()) - .stream().filter(entity -> entity.getState() != JobState.CANCELLED).findFirst() - .get().getTransactionId(); + addLoadJob(loadJob); Review comment: addLoadJob(loadJob); loadJob.unprotectedExecute(); ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org