You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "turkeymz (via GitHub)" <gi...@apache.org> on 2024/01/11 02:31:40 UTC

[D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

GitHub user turkeymz created a discussion: [Question] clear API also delete graph username/password (Auth info)

### Bug Type (问题类型)

rest-api (结果不合预期)

### Before submit

- [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

### Environment (环境信息)

- Server Version: 1.0.0 (Apache Release Version)
- Backend:HBase
- OS: CentOS 7.9


### Expected & Actual behavior (期望与实际表现)

执行:http://{}:{}/graphs/{}/clear?confirm_message=I%27m+sure+to+delete+all+data
此时把整个图数据库都清掉了,包括登录的账号面。以前只清理边和点等。真得万一执行,图数据库是在的,但登录不上了。这导致测试环境下的调试很不方便。

期望恢复过去只清除边和点等业务数据

### Vertex/Edge example (问题点 / 边数据举例)

_No response_

### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

_No response_

GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org


Re: [D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

Posted by "Z-HUANT (via GitHub)" <gi...@apache.org>.
GitHub user Z-HUANT added a comment to the discussion: [Question] clear API also delete graph username/password (Auth info)

@turkeymz 后续新版本会对 Auth 数据进行隔离,你可以先把 Auth 数据单独存储在一个 Graph 中,也可以避免 Clear API 删除,操作步骤参考:

**(推荐)** 一个 Server 中配置两个 Graph 的方案:
1. 一个 Server 进程中配置两个 Graph, 一个用户数据图, 一个事 Auth 专用图
2. 复制 conf/graphs 文件夹下的 hugegraph.properties,命名为 auth.properties,用于存储 auth 信息,记得修改里面的 store 属性
3. 修改 conf 文件夹下的 rest-server.properties 的 auth.graph_store 属性,value 值为 auth,让 auth 信息存储在 auth.properties 配置的 store 数据库
4. 执行 init-store 会初始化两个数据库(hugegraph.properties、auth.properties),admin 账号存储在 auth.properties
5. 启动 HugeGraph,执行 Clear API 只会删除 hugegraph.properties 的数据,不会删除 auth.properties 的数据

---
**注:** 如果生产环境已有 **≥ 2** 个 Server:
1. 新开一个 Auth Server 单独存储 Auth 数据
2. Auth Server 配置参考:https://hugegraph.apache.org/cn/docs/config/config-authentication/
2. 其他 Server 修改 rest-server.properties 的 auth.remote_url 属性,指向 Auth Server
4. 其他 Server 执行 Clear API 只会删除自己的数据,不会影响 Auth Server 的账号信息

GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413#discussioncomment-8089279

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org


Re: [D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

Posted by "turkeymz (via GitHub)" <gi...@apache.org>.
GitHub user turkeymz added a comment to the discussion: [Question] clear API also delete graph username/password (Auth info)

> > 以前只清理边和点等, 期望恢复过去只清除边和点等业务数据
> 
> @javeme Did we **only clean** vertexes/edges before? I'm not sure about this @turkeymz What is the version you kept **other meta information** before?

是的,过去使用0.12.0只会清理图数据(属性、点、线、索引等),保留用户数据。
目前使用版本是1.0.0,存储底层用HBase。但会所有清理,导致图数据库报异常。

GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413#discussioncomment-8089277

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org


Re: [D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
GitHub user imbajin added a comment to the discussion: [Question] clear API also delete graph username/password (Auth info)

> > > 以前只清理边和点等, 期望恢复过去只清除边和点等业务数据
> > 
> > 
> > @javeme Did we **only clean** vertexes/edges before? I'm not sure about this @turkeymz What is the version you kept **other meta information** before?
> 
> 是的,过去使用0.12.0只会清理图数据(属性、点、线、索引等),保留用户数据。 目前使用版本是1.0.0,存储底层用HBase。但会所有清理,导致图数据库报异常。

In theory, there should be **no modification for** this section. If you have time, could help to check **which PR** adjustment was made to the clear graph logic and optimize it

GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413#discussioncomment-8089278

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org


Re: [D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
GitHub user imbajin added a comment to the discussion: [Question] clear API also delete graph username/password (Auth info)

> 以前只清理边和点等, 期望恢复过去只清除边和点等业务数据

@javeme Did we **only clean**  vertexes/edges before? I'm not sure about this 
@turkeymz  What is the version you kept **other meta information** before?



GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413#discussioncomment-8089276

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org


Re: [D] [Question] clear API also delete graph username/password (Auth info) [incubator-hugegraph]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
GitHub user javeme added a comment to the discussion: [Question] clear API also delete graph username/password (Auth info)

感谢反馈,后续我们会改进此特性 (https://github.com/apache/incubator-hugegraph/issues/2324 )。将用户数据信息单独存储,保持图数据与用户数据隔离独立。

GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2413#discussioncomment-8089275

----
This is an automatically sent email for dev@hugegraph.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hugegraph.apache.org