From 7c4878d99b8791d75bb49cd1dbc5dec3ddcb7d22 Mon Sep 17 00:00:00 2001 From: Zhiyuan He Date: Wed, 12 Aug 2020 13:50:13 +0800 Subject: [PATCH] fix --- src/database-controller/src/common/framework.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database-controller/src/common/framework.js b/src/database-controller/src/common/framework.js index fa62899e61..59459f8e4f 100644 --- a/src/database-controller/src/common/framework.js +++ b/src/database-controller/src/common/framework.js @@ -441,14 +441,14 @@ async function synchronizeRequest(snapshot, addOns) { // There may be multiple calls of synchronizeRequest. // Poller and write-merger uses this method. try { - await k8s.getFramework(snapshot.getName()); - // if framework exists + // Try to modify the framework const frameworkResponse = await synchronizeModify(snapshot); logger.info( `Request of framework ${snapshot.getName()} is successfully patched.`, ); return frameworkResponse; } catch (err) { + // If framework doesn't exist, create it. if (err.response && err.response.statusCode === 404) { const frameworkResponse = await synchronizeCreate(snapshot, addOns); logger.info(