[BUG] participants is not atomicly setten

This commit is contained in:
Handora
2024-02-10 00:17:21 +00:00
committed by ob-robot
parent ab5422253c
commit 78243c1f9a

View File

@ -1729,12 +1729,18 @@ typedef common::ObSEArray<ObTxExecPart, share::OB_DEFAULT_LS_COUNT> ObTxRollback
if (OB_FAIL(parts.push_back(commit_parts.at(idx).ls_id_))) { \ if (OB_FAIL(parts.push_back(commit_parts.at(idx).ls_id_))) { \
TRANS_LOG(WARN, "parts push failed", K(ret)); \ TRANS_LOG(WARN, "parts push failed", K(ret)); \
} \ } \
} \
if (OB_FAIL(ret)) { \
parts.reset(); \
} }
#define CONVERT_PARTS_TO_COMMIT_PARTS(parts, commit_parts) \ #define CONVERT_PARTS_TO_COMMIT_PARTS(parts, commit_parts) \
for (int64_t idx = 0; OB_SUCC(ret) && idx < parts.count(); idx++) { \ for (int64_t idx = 0; OB_SUCC(ret) && idx < parts.count(); idx++) { \
if (OB_FAIL(commit_parts.push_back(ObTxExecPart(parts.at(idx), -1, -1)))) { \ if (OB_FAIL(commit_parts.push_back(ObTxExecPart(parts.at(idx), -1, -1)))) { \
TRANS_LOG(WARN, "parts push failed", K(ret)); \ TRANS_LOG(WARN, "parts push failed", K(ret)); \
} \ } \
} \
if (OB_FAIL(ret)) { \
commit_parts.reset(); \
} }
class ObEndParticipantsRes class ObEndParticipantsRes