Add graphs.enable_dynamic_create_drop option#1809
Conversation
|
CLA Assistant Lite bot Good! All Contributors have signed the CLA. |
|
|
|
I have read the CLA Document and I hereby sign the CLA |
| "dynamic_create_graph", | ||
| "Whether to create graph dynamically", | ||
| disallowEmpty(), | ||
| true |
There was a problem hiding this comment.
Thank you for your contribution.
Not sure in what scenario the option needs to be turned off?
There was a problem hiding this comment.
Hi @javeme , thanks for your reply, I am worried that my online stable graph instance will be dropped by misoperation.
Codecov Report
@@ Coverage Diff @@
## master #1809 +/- ##
============================================
+ Coverage 66.93% 68.90% +1.97%
+ Complexity 980 692 -288
============================================
Files 446 446
Lines 37781 37787 +6
Branches 5380 5380
============================================
+ Hits 25289 26038 +749
+ Misses 9768 9082 -686
+ Partials 2724 2667 -57
Continue to review full report at Codecov.
|
hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/config/ServerOptions.java
Outdated
Show resolved
Hide resolved
| "dynamic_create_graph", | ||
| "Whether to create graph dynamically", | ||
| disallowEmpty(), | ||
| true |
hugegraph-api/src/main/java/com/baidu/hugegraph/core/GraphManager.java
Outdated
Show resolved
Hide resolved
| public HugeGraph createGraph(String name, String configText) { | ||
| E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP), | ||
| "Not allowed to create graph dynamically, " + | ||
| "please set `enable_dynamic_create_drop` to true.", |
There was a problem hiding this comment.
align with ""Not allowed..."
| E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP), | ||
| "Not allowed to create graph dynamically, " + | ||
| "please set `enable_dynamic_create_drop` to true.", | ||
| name); |
There was a problem hiding this comment.
need to fill graph name parameter: "Not allowed to create graph dynamically: '%s', "?
| HugeGraph graph = this.graph(name); | ||
| E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP), | ||
| "Not allowed to drop graph dynamically, " + | ||
| "please set `enable_dynamic_create_drop` to true.", |
There was a problem hiding this comment.
align with ""Not allowed..."
| E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP), | ||
| "Not allowed to drop graph dynamically, " + | ||
| "please set `enable_dynamic_create_drop` to true.", | ||
| name); |
| } | ||
|
|
||
| public HugeGraph createGraph(String name, String configText) { | ||
| E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP), |
There was a problem hiding this comment.
can rename hugeConfig to conf, and expect 'this.xx' prefix style for member access: "this.conf"
DYNAMIC_CREATE_GRAPH optiongraphs.enable_dynamic_create_drop option
closed #1808