Add `graphs.enable_dynamic_create_drop` option by simon824 · Pull Request #1809 · apache/hugegraph

@simon824

@simon824

@github-actions

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

@CLAassistant

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

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

javeme

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

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?

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.

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

@simon824

javeme

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

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

@simon824

javeme

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.",

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);

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', "?

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.",

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);

Choose a reason for hiding this comment

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

ditto

@simon824

javeme

}

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

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"

@simon824

@javeme javeme changed the title Add DYNAMIC_CREATE_GRAPH option Add graphs.enable_dynamic_create_drop option

Apr 6, 2022

javeme

imbajin