From ac567f7e71381b147b6da98c0429b6fa61a16534 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 18 Mar 2022 10:17:20 +0800 Subject: [PATCH] retry max three times if update is conflicted --- packages/api/src/elastic/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/api/src/elastic/index.ts b/packages/api/src/elastic/index.ts index 65a645bc5..c2acfdce7 100644 --- a/packages/api/src/elastic/index.ts +++ b/packages/api/src/elastic/index.ts @@ -201,6 +201,7 @@ export const updatePage = async ( }, }, refresh: ctx.refresh, + retry_on_conflict: 3, }) if (body.result !== 'updated') return false