-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ci too much exception "pk table not exist" #1098
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1098 +/- ##
============================================
+ Coverage 69.23% 69.30% +0.07%
- Complexity 5558 5586 +28
============================================
Files 331 331
Lines 26970 26997 +27
Branches 3861 3865 +4
============================================
+ Hits 18673 18711 +38
+ Misses 6463 6457 -6
+ Partials 1834 1829 -5 Continue to review full report at Codecov.
|
this.storeProvider.clear(); | ||
} finally { | ||
this.loadGraphStore().close(); | ||
this.loadSystemStore().close(); | ||
this.loadSchemaStore().close(); | ||
LockUtil.unlock(this.name, TaskManager.HEARTBEAT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to line 258
@@ -250,11 +252,13 @@ public void clearBackend() { | |||
this.loadSystemStore().open(this.configuration); | |||
this.loadGraphStore().open(this.configuration); | |||
try { | |||
LockUtil.lock(this.name, TaskManager.HEARTBEAT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move out of try
@@ -231,12 +231,14 @@ public void initBackend() { | |||
this.loadSystemStore().open(this.configuration); | |||
this.loadGraphStore().open(this.configuration); | |||
try { | |||
LockUtil.lock(this.name, TaskManager.HEARTBEAT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to a common name like GRAPH_LOCK
@@ -268,14 +272,15 @@ public void clearBackend() { | |||
public void truncateBackend() { | |||
this.waitUntilAllTasksCompleted(); | |||
|
|||
LockUtil.lock(this.name, TaskManager.GRAPH_LOCK); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
@@ -45,7 +45,7 @@ | |||
|
|||
private static final Logger LOG = Log.logger(TaskManager.class); | |||
|
|||
public static final String HEARTBEAT = "heartbeat"; | |||
public static final String GRAPH_LOCK = "graph_lock"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to LockUtil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
executeTasksOnWorker
@@ -276,6 +288,11 @@ private void scheduleOrExecuteJob() { | |||
} | |||
} catch (Throwable e) { | |||
LOG.error("Exception occurred when schedule job", e); | |||
} finally { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only do executeTasksOnWorker and cancelTasksOnWorker when !server.master() or server.onlySingleNode(), and rename server to serverManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following query is triggered each time:
2020-07-18 13:33:26 2589143 [server-info-db-worker-1] [INFO ] com.baidu.hugegraph.backend.Transaction [] - Transaction query: `Query * from VERTEX where id in [server1]`
2020-07-18 13:33:26 2589146 [server-info-db-worker-1] [INFO ] com.baidu.hugegraph.backend.Transaction [] - Transaction query: `Query * from VERTEX where [LABEL == -38]`
2020-07-18 13:33:26 2589149 [task-db-worker-1] [INFO ] com.baidu.hugegraph.backend.Transaction [] - Transaction query: `Query * from SECONDARY_INDEX page '', limit 2 where [INDEX_LABEL_ID == -54, FIELD_VALUES == 12]`
2020-07-18 13:33:26 2589150 [task-db-worker-1] [INFO ] com.baidu.hugegraph.backend.Transaction [] - Transaction query: `Query * from SECONDARY_INDEX page '', limit 2 where [INDEX_LABEL_ID == -54, FIELD_VALUES == 13]`
2020-07-18 13:33:26 2589152 [task-db-worker-1] [INFO ] com.baidu.hugegraph.backend.Transaction [] - Transaction query: `Query * from SECONDARY_INDEX page '', limit 2 where [INDEX_LABEL_ID == -54, FIELD_VALUES == 18]`
this is triggered by
|
Change-Id: Ie9a1ba689ae4aec876bf9793970a1d62e3c69abf
94672c0
to
98d8fe0
Compare
cassandra:
hbase:
|
ServerInfoManager server = scheduler.serverManager(); | ||
ServerInfoManager serverManager = scheduler.serverManager(); | ||
|
||
String graph = scheduler.graph().name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add graphName() to call graphparams.name() to avoid auth issue
@@ -94,7 +94,7 @@ public void addScheduler(HugeGraphParams graph) { | |||
this.schedulers.put(graph, scheduler); | |||
} | |||
|
|||
public void closeScheduler(HugeGraphParams graph) { | |||
public synchronized void closeScheduler(HugeGraphParams graph) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some comments
fix #1075
Change-Id: Ie9a1ba689ae4aec876bf9793970a1d62e3c69abf