Skip to content
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

Add graphs.enable_dynamic_create_drop option #1809

Merged
merged 5 commits into from
Apr 6, 2022
Merged

Conversation

simon824
Copy link
Member

@simon824 simon824 commented Apr 6, 2022

closed #1808

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

CLA Assistant Lite bot Good! All Contributors have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@simon824
Copy link
Member Author

simon824 commented Apr 6, 2022

I have read the CLA Document and I hereby sign the CLA

"dynamic_create_graph",
"Whether to create graph dynamically",
disallowEmpty(),
true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.
Not sure in what scenario the option needs to be turned off?

Copy link
Member Author

@simon824 simon824 Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @javeme , thanks for your reply, I am worried that my online stable graph instance will be dropped by misoperation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get it, sounds make sense

@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #1809 (12fc59c) into master (0cc02e4) will increase coverage by 1.97%.
The diff coverage is 66.66%.

@@             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     
Impacted Files Coverage Δ
...in/java/com/baidu/hugegraph/core/GraphManager.java 43.87% <33.33%> (+2.27%) ⬆️
...java/com/baidu/hugegraph/config/ServerOptions.java 100.00% <100.00%> (ø)
...hugegraph/backend/store/hbase/HbaseSerializer.java 0.00% <0.00%> (-100.00%) ⬇️
...egraph/backend/store/hbase/HbaseStoreProvider.java 0.00% <0.00%> (-100.00%) ⬇️
...u/hugegraph/backend/store/hbase/HbaseFeatures.java 0.00% <0.00%> (-90.91%) ⬇️
...idu/hugegraph/backend/store/hbase/HbaseTables.java 0.00% <0.00%> (-89.92%) ⬇️
...du/hugegraph/backend/store/hbase/HbaseMetrics.java 0.00% <0.00%> (-86.85%) ⬇️
...aidu/hugegraph/backend/store/hbase/HbaseTable.java 0.00% <0.00%> (-78.75%) ⬇️
...aidu/hugegraph/backend/store/hbase/HbaseStore.java 0.00% <0.00%> (-72.73%) ⬇️
...u/hugegraph/backend/store/hbase/HbaseSessions.java 0.00% <0.00%> (-58.69%) ⬇️
... and 118 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cc02e4...12fc59c. Read the comment docs.

github-actions bot added a commit that referenced this pull request Apr 6, 2022
"dynamic_create_graph",
"Whether to create graph dynamically",
disallowEmpty(),
true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get it, sounds make sense

@@ -157,6 +159,10 @@ public HugeGraph cloneGraph(String name, String newName,
}

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.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to fill graph name parameter: "Not allowed to create graph dynamically: '%s', "?

@@ -171,6 +177,10 @@ public HugeGraph createGraph(String name, String configText) {

public void dropGraph(String name) {
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.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -157,6 +159,10 @@ public HugeGraph cloneGraph(String name, String newName,
}

public HugeGraph createGraph(String name, String configText) {
E.checkArgument(hugeConfig.get(ServerOptions.ENABLE_DYNAMIC_CREATE_DROP),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can rename hugeConfig to conf, and expect 'this.xx' prefix style for member access: "this.conf"

@javeme javeme changed the title Add DYNAMIC_CREATE_GRAPH option Add graphs.enable_dynamic_create_drop option Apr 6, 2022
@javeme javeme merged commit 7acd4fc into apache:master Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add graphs.enable_dynamic_create_drop option
4 participants