-
Notifications
You must be signed in to change notification settings - Fork 581
fix(server): fix the scheduler and the scheduler selection logic #2937
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
base: master
Are you sure you want to change the base?
Changes from 20 commits
b4321eb
d19096d
a32901a
42ee2ba
c976caa
570d670
5915428
e7da7e5
b0f381c
804055d
2e8578e
2c44cee
925c384
3974048
a349f62
3e7bc6f
e6cc98b
e6f6487
b325dba
68b906a
1113520
5ffd20b
a110112
a31e937
d89b9bd
5807fb7
f8fc58a
6dd52e4
af85bef
b332674
cac78f4
28e0390
5e30cac
b70788f
7ba40bd
9ad8c57
71978ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -176,7 +176,6 @@ public class StandardHugeGraph implements HugeGraph { | |||||||||||||||||||||||
| private final BackendStoreProvider storeProvider; | ||||||||||||||||||||||||
| private final TinkerPopTransaction tx; | ||||||||||||||||||||||||
| private final RamTable ramtable; | ||||||||||||||||||||||||
| private final String schedulerType; | ||||||||||||||||||||||||
| private volatile boolean started; | ||||||||||||||||||||||||
| private volatile boolean closed; | ||||||||||||||||||||||||
| private volatile GraphMode mode; | ||||||||||||||||||||||||
|
|
@@ -229,7 +228,6 @@ public StandardHugeGraph(HugeConfig config) { | |||||||||||||||||||||||
| this.closed = false; | ||||||||||||||||||||||||
| this.mode = GraphMode.NONE; | ||||||||||||||||||||||||
| this.readMode = GraphReadMode.OLTP_ONLY; | ||||||||||||||||||||||||
| this.schedulerType = config.get(CoreOptions.SCHEDULER_TYPE); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| LockUtil.init(this.spaceGraphName()); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -315,6 +313,7 @@ public String backend() { | |||||||||||||||||||||||
| return this.storeProvider.type(); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||
| public BackendStoreInfo backendStoreInfo() { | ||||||||||||||||||||||||
| // Just for trigger Tx.getOrNewTransaction, then load 3 stores | ||||||||||||||||||||||||
| // TODO: pass storeProvider.metaStore() | ||||||||||||||||||||||||
|
|
@@ -465,6 +464,7 @@ public void updateTime(Date updateTime) { | |||||||||||||||||||||||
| this.updateTime = updateTime; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||
| public void waitStarted() { | ||||||||||||||||||||||||
| // Just for trigger Tx.getOrNewTransaction, then load 3 stores | ||||||||||||||||||||||||
| this.schemaTransaction(); | ||||||||||||||||||||||||
|
|
@@ -1629,7 +1629,8 @@ public <T> void submitEphemeralJob(EphemeralJob<T> job) { | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| @Override | ||||||||||||||||||||||||
| public String schedulerType() { | ||||||||||||||||||||||||
| return StandardHugeGraph.this.schedulerType; | ||||||||||||||||||||||||
| // Use distributed scheduler for hstore backend, otherwise use local | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| // Use distributed scheduler for hstore backend, otherwise use local | |
| /* | |
| * HStore is a distributed backend: data and tasks may be handled by | |
| * multiple graph servers that must coordinate scheduling and state. | |
| * For this reason we require a distributed task scheduler when the | |
| * backend is hstore so that jobs can be balanced and recovered | |
| * across nodes. For other backends, the graph is served by a single | |
| * server instance and tasks are executed locally, so a local | |
| * in-process scheduler is sufficient and avoids the overhead of | |
| * distributed coordination. | |
| */ |
Uh oh!
There was an error while loading. Please reload this page.