mymeiyi commented on code in PR #23053: URL: https://github.com/apache/doris/pull/23053#discussion_r1322299146
########## fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java: ########## @@ -2020,6 +2025,39 @@ private void httpStreamPutImpl(TStreamLoadPutRequest request, TStreamLoadPutResu } } + @Override + public TCheckWalResult checkWal(TCheckWalRequest request) { + TCheckWalResult result = new TCheckWalResult(); + TStatus status = new TStatus(TStatusCode.OK); + result.setStatus(status); + boolean res = true; + try { + res = checkWalImpl(request.getDbId(), request.getWalId(), request.getWalId()); + } catch (Throwable e) { + LOG.warn("catch unknown result.", e); + status.setStatusCode(TStatusCode.INTERNAL_ERROR); + status.addToErrorMsgs(e.getClass().getSimpleName() + ": " + Strings.nullToEmpty(e.getMessage())); + return result; + } + result.setNeedRecovery(res); + return result; + } + + private boolean checkWalImpl(long dbId, long walId, long transactionId) { + TransactionState state = Env.getCurrentGlobalTransactionMgr() Review Comment: Here we should check all label related txns, not only the first txn id. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org