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

Dgraph初始化并且drop-all时表结构丢失 #13

Closed
wangyuheng opened this issue Sep 19, 2020 · 0 comments · Fixed by #41
Closed

Dgraph初始化并且drop-all时表结构丢失 #13

wangyuheng opened this issue Sep 19, 2020 · 0 comments · Fixed by #41
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wangyuheng
Copy link
Owner

背景

#7 提供了Dgraph初始化操作

    {
      "name": "arc.dgraph.init",
      "type": "java.lang.Boolean",
      "description": "init dgraph schema by dgraph define.",
      "defaultValue": "false"
    },
    {
      "name": "arc.dgraph.drop-all",
      "type": "java.lang.Boolean",
      "description": "drop all data! & schema! when init.",
      "defaultValue": "false"
    }

现象

同时开启初始化及drop-all操作时,表结构Schema丢失

arc:
  dgraph:
    urls: localhost:39081
    init: true
    drop-all: true

期望

只删除数据,表结构按照schema完成初始化

原因

  1. 同时执行时,dgraph会先变更表结构,再执行drop-all操作,导致表结构被删除

其他

dgraph4j 提供了更细粒度的drop控制

@wangyuheng wangyuheng added the bug Something isn't working label Sep 19, 2020
@wangyuheng wangyuheng added this to the 1.1.0 milestone Sep 19, 2020
@wangyuheng wangyuheng modified the milestones: 1.1.0, 1.2.0 Nov 5, 2020
@wangyuheng wangyuheng linked a pull request Dec 4, 2020 that will close this issue
@wangyuheng wangyuheng self-assigned this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant