Giter Site home page Giter Site logo

tugraph-family / tugraph-db Goto Github PK

View Code? Open in Web Editor NEW
1.2K 27.0 164.0 100.53 MB

TuGraph is a high performance graph database.

Home Page: https://tugraph.org

License: Apache License 2.0

Shell 0.20% CMake 1.27% Python 5.81% C++ 86.37% Java 0.14% C 5.10% ANTLR 0.59% Cycript 0.33% Cypher 0.03% Cython 0.15% Starlark 0.01%
cpp cypher database fastest graph snb rust finbench

tugraph-db's Introduction

TuGraph

Release UT&&IT Documentation Status Commit codecov

Star Fork Contributor Docker License

EN CN

[中文版]

📣 TuGraph-db Free Trial on Aliyun with Guide.

1. Introduction

TuGraph is an efficient graph database that supports high data volume, low latency lookup and fast graph analytics.

Functionalities:

  • Labeled property graph model
  • Full ACID support with serializable transactions
  • Graph analytics algorithms embedded with graph computing framework
  • Full-Text/Primary/Secondary Index support
  • OpenCypher query API
  • Stored procedure with C++/Python API

Performance and scalability:

You can find TuGraph's doc by link, and welcome to our website.

2. Quick Start

An easy way to start is using docker to set up, which can be found in DockerHub, named tugraph/tugraph-runtime-[os]:[tugraph version], for example, tugraph/tugraph-runtime-centos7:3.3.0.

For more details, please refer to quick start doc.

3. Build from Source

It's recommended to build TuGraph in linux system, and docker environment is a good choice. If you want to setup a new environment, please refer to Dockerfile.

Here are steps to compile TuGraph:

  1. run deps/build_deps.sh to build tugraph-web if you need. Skip this step otherwise.
  2. cmake .. -DOURSYSTEM=centos or cmake .. -DOURSYSTEM=ubuntu
  3. If support shell lgraph_cypher, use -DENABLE_PREDOWNLOAD_DEPENDS_PACKAGE=1
  4. make
  5. make package or cpack --config CPackConfig.cmake

Example: tugraph/tugraph-compile-centos7Docker environment

$ git clone --recursive https://github.com/TuGraph-family/tugraph-db.git
$ cd tugraph-db
$ deps/build_deps.sh
$ mkdir build && cd build
$ cmake .. -DOURSYSTEM=centos -DENABLE_PREDOWNLOAD_DEPENDS_PACKAGE=1
$ make
$ make package

4. Develop

We have prepared environment docker images for compiling in DockerHub, named tugraph/tugraph-compile-[os]:[compile version], for example, tugraph/tugraph-compile-centos7:1.1.0, which can help developers get started easily.

We have a roadmap to help you understand TuGraph.

To contribute, please read doc.

NOTICE: If you want to contribute code, you should sign a cla doc.

5. Partners

HUST FU ZJU
WhaleOps OceanBase SecretFlow

6. Contact

Official Website: www.tugraph.org

Slack (For developer quick communication): TuGraph.slack

Contact us via dingtalk, wechat, email and telephone: contacts

tugraph-db's People

Contributors

ak-tu avatar antkiller996 avatar caq avatar clarkclk avatar dependabot[bot] avatar eddiehrs avatar fanzhidongyzby avatar gongchangyan avatar gtahoo avatar hanwen-sun avatar hexrt avatar hjk41 avatar hush-z avatar jasinliu avatar jiazhenjiang avatar jinderek avatar kehuang19 avatar knightast avatar limingyao001 avatar lipanpan03 avatar ljcui avatar lloydzhou avatar qishipengqsp avatar rocklau avatar siyuan0322 avatar songlinlyu avatar spasserby avatar unclelld avatar wangtao9 avatar yangyang233333 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tugraph-db's Issues

如何查看离线导入图

离线导入数据
lgraph_import -c /usr/SF3/import.conf --dir /data/lgraph_db --graph mygraph --delimiter "|"
怎样查看mygraph

20221006023354.651: Load vertex label Tag
20221006023354.726:     File [/usr/SF3/tag_0_0.csv]
20221006023354.846: Load edges from vertex Tag to Person
20221006023354.846: Load edges from vertex Person to Tag
20221006023354.856:     File [/usr/SF3/person_hasInterest_tag_0_0.csv]
20221006023355.359: Load vertex label Organisation
20221006023355.431:     File [/usr/SF3/organisation_0_0.csv]
20221006023355.533: Load edges from vertex Organisation to Person
20221006023355.533: Load edges from vertex Person to Organisation
20221006023355.546:     File [/usr/SF3/person_studyAt_organisation_0_0.csv]
20221006023355.633:     File [/usr/SF3/person_workAt_organisation_0_0.csv]
20221006023355.773: Load vertex label Place
20221006023355.846:     File [/usr/SF3/place_0_0.csv]
20221006023355.869: Load edges from vertex Place to Person
20221006023355.869: Load edges from vertex Person to Place
20221006023355.877:     File [/usr/SF3/person_isLocatedIn_place_0_0.csv]
20221006023355.961: Write vertex label Person
20221006023356.488:      50% - Committed 24328, time to write batch=0.0458605
20221006023356.491: Load edges from vertex Organisation to Tag
20221006023356.491: Load edges from vertex Tag to Organisation
20221006023356.491: Load vertex label TagClass
20221006023356.570:     File [/usr/SF3/tagclass_0_0.csv]
20221006023356.599: Load edges from vertex TagClass to Tag
20221006023356.599: Load edges from vertex Tag to TagClass
20221006023356.607:     File [/usr/SF3/tag_hasType_tagclass_0_0.csv]
20221006023356.663: Write vertex label Tag
20221006023357.036:      100% - Committed 16080, time to write batch=0.0283775
20221006023357.040: Load edges from vertex Place to Organisation
20221006023357.040: Load edges from vertex Organisation to Place
20221006023357.045:     File [/usr/SF3/organisation_isLocatedIn_place_0_0.csv]
20221006023357.085: Write vertex label Organisation
20221006023357.356:      100% - Committed 7955, time to write batch=0.0138955
20221006023357.359: Load edges from vertex Place to Place
20221006023357.390:     File [/usr/SF3/place_isPartOf_place_0_0.csv]
20221006023357.418: Write vertex label Place
20221006023358.367:      100% - Committed 1460, time to write batch=0.00175762
20221006023358.370: Load edges from vertex TagClass to TagClass
20221006023358.372:     File [/usr/SF3/tagclass_isSubclassOf_tagclass_0_0.csv]
20221006023358.393: Write vertex label TagClass
20221006023359.169:      100% - Committed 71, time to write batch=0.000370264
20221006023359.171: Persisting data...
20221006023359.179: Import finished in 5.62804 seconds.

[minor] Some Chinese characters in code comment

grep -P '[\p{Han}]' src/* -R
src/client/java/TuGraphRpcClient/rpc-client/src/main/java/com/alipay/tugraph/TuGraphService.java:     * serviceName默
认是包名 + 类名,methodName是proto文件Service内对应方法名,
src/client/java/TuGraphRpcClient/rpc-client/src/main/java/com/alipay/tugraph/TuGraphService.java:     * serviceName默
认是类名,不需要加包名,methodName是proto文件Service内对应方法index,默认从0开始。
src/cypher/arithmetic/arithmetic_expression.cpp:            // 将children都分别进行evaluate操作,并且添加到input进行
输出
src/cypher/execution_plan/execution_plan.cpp:        // 符号表中没有type为argument的

容器卡死重启后,启动失败

Describe the bug
容器卡死无响应,直接重启容器启动失败,并产生如下日志

Server started.
ParseJson skipping enable_ha : false
ParseJson skipping license : /var/lib/lgraph/fma.lic
Listening for RPC on port 9090
Server hit an exception and shuts down abnormally:
KvException: Failed to apply logs, unexpected TXN_BEGIN
Server shutdown.
ParseJson skipping enable_ha : false
ParseJson skipping license : /var/lib/lgraph/fma.lic
Listening for RPC on port 9090
Server hit an exception and shuts down abnormally:
KvException: Failed to apply logs, unexpected TXN_BEGIN
Server shutdown.

Environment:

./lgraph_import import data failed

could you pls take a look why this error happens? the relation start label and end label both Movie vertex.
here is my schma:

{"schema":[{"label":"Movie","type":"VERTEX","properties":[{"name":"keyno","type":"STRING"},{"name":"name","type":"STRING"},{"name":"shortstatus","type":"STRING"},{"name":"econkind","type":"STRING"},{"name":"registcapi","type":"STRING"},{"name":"hasimage","type":"STRING"},{"name":"groupid","type":"STRING"},{"name":"ismain","type":"STRING"},{"name":"isinvestor","type":"STRING"},{"name":"isipo","type":"STRING"}],"primary":"keyno"},{"label":"GLF","type":"EDGE","constraints":[["Movie","Movie"]]}],"files":[{"path":"/usr/local/lgraph_db/Movie.csv","header":0,"format":"CSV","label":"Movie","columns":["keyno","name","shortstatus","econkind","registcapi","hasimage","groupid","ismain","isinvestor","isipo"]},{"path":"/usr/local/lgraph_db/glf.csv","header":2,"format":"CSV","label":"GLF","SRC_ID":"src","DST_ID":"dst","columns":["SRC_ID","DST_ID"]}]}768  5- 

command:
./lgraph_import --online false -c /root/GLF_schema.json --dir /usr/local/lgraph_db/ --graph GLF --overwrite true
error:
image

[doc] doc-zh/operating/introduce.md typo

Expected Behavior

TuGraph 采用语义化版本控制 2.0.0 标准,版本格式:主版本号.次版本号.修订号,版本递增规则如下:

  1. 主版本号:做了不兼容的 API 修改
  2. 次版本号:做了向下兼容的功能性新增
  3. 修订号:做了向下兼容的问题修正

Actual Behavior

TuGraph 采用语义化版本控制 2.0.0 标准,版本格式:主版本号·次版本号·修订号,版本递增规则如下:

  1. 主版本号:做了不兼容的 API 修改
  2. 次版本号:做了线下兼容的功能性新增
  3. 修订号:做了向下兼容的问题修正

Description

  1. 主版本号·次版本号·修订号 -> 主版本号.次版本号.修订号
  2. 线下->向下
  3. Fix the order number in the markdown source code.(View in source code mode)

Specifications

  • Version: v3.3.0
  • Platform: Windows11

cypher查询时间的问题

我在使用lgraph_cypher测试多度查询时间的时候,发现对于同样的种子,有些1度查询的速度明显慢于2,3,4度查询,我查看了一下输出,发现1度查询的size of query是最大的,请问TuGraph计算的cypher查询时间是否包括打印结果的时间?

「call db.addEdgeIndex」 fail

Describe the bug
The builtin procedure「DbAddEdgeIndex」fails when try to create new edge index.

To Reproduce
Steps to reproduce the behavior:

  1. just add an edge index throw web-console, or cypher.
  2. you can use my unit test to verify either.

Expected behavior
A new edge index should be created and no error.

Screenshots
image

Environment:

  • OS: Ubuntu 20.04 LTS (GNU/Linux 5.15.30-2-pve x86_64)
  • CPU: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz
  • Compiler: GCC 5.4.0 Debug mode

Additional context
Related code:
image

The root cause is in edge_index.h, line 81.
It get the wrong order subtraction, which will cause a big n.

使用 lgraph_cypher 查询离线导入图时报错“no such graph"

Describe the bug
执行命令 ./lgraph_cypher.py -u username -p passsword-g graphname -t 15000000 -s "match(n:account) return n limit 100"
报错:
Error occured during Post request
Error occured:
++++No such graph.++++

To Reproduce
Steps to reproduce the behavior:
先离线导入图,在使用lgraph.cypher之前启动了lgraph_server, 显示server started,然执行lgraph_cypher命令

Environment:

  • docker镜像 tugraph/tugraph-db-centos7:3.3.0

[dependency] TuGraph Browser - Failed to compile (cpp) plugin

Describe the bug

TuGraph Browser Failed to compile cpp plugin. Caused by not found 'json.hpp' file.

To Reproduce
Steps to reproduce the behavior:

  1. Flow 'quick-start', use docker to pull image.(bash docker pull tugraph/tugraph-db-centos7)
  2. Run with bash
    docker run -d -p 7070:7070 -p 9090:9090 --name tugraph_demo tugraph/tugraph-db-centos7 lgraph_server
  3. Browser http://xxxx:7070. And login.
  4. Click “帮助” -> “快速上手” -> “一键安装插件”. Then click left menu "插件".
  5. See error (Failed to install cpp plugin)

OR

  1. Click "帮助" -> "插件", download khop.cpp
  2. Click left menu "插件" -> "添加插件", choose your file khop.cpp and type cpp...
  3. Click "创建", See error
    Failed to compile plugin. Stdout:---- Stderr:---- /var/lib/lgraph/data/95AE5128C290CC84F2BEBE0662EC1217/_cpp_plugin_/_fma_CPP1714636915_1662686797376047776.tmp/_fma_CPP.cpp:11:22: fatal error: ./json.hpp: No such file or directory #include "./json.hpp" ^ compilation terminated.

Expected behavior
Install cpp plugin khop.cpp successfully.

Screenshots
image

Environment:

  • OS: CentOS 7.9 64bit
  • CPU: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
  • Compiler: 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

Additional context
nope

Bad Request when return edge

Describe the bug
Unable to return edge results when pattern is in the form of ()-[e*1]-() or ()-[e*1..]-()

To Reproduce
Steps to reproduce the behavior:

match p=(v)-[e*1]->(n) return e
match p=(v)-[e*1..]->(n) return e

Expected behavior
Returns a list of edges matching the constraints of pattern.

Screenshots
image

Environment:

  • OS: [e.g. Ubuntu 18.04]
  • CPU: [e.g. Intel(R) Xeon(R) Platinum 8352Y CPU @ 2.20GHz]

浏览器怎么访问

按照说明文档,启动了docker,端口号7090,但浏览器无法访问是什么原因?

tugraph-explore.md中下载TuGraph Explore 镜像时无法下载

Describe the bug
tugraph-explore.md中下载TuGraph Explore 镜像:点击下载时无法下载

To Reproduce
Steps to reproduce the behavior:

  1. Go to doc-->zh-CH-->2.operating-->6.tools-->4.tugraph-explore.md

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Uploading image.png…

Environment:

  • OS: [e.g. Ubuntu 18.04]
  • CPU: [e.g. Intel Xeon xxxx]
  • Compiler: [e.g. GCC 8.0]

Additional context
Add any other context about the problem here.

编译源码无法找到 fma-cloud 下的依赖

如题,编译 tugraph-db 源码的时候,发现缺少 jwt-cpp、cpprestsdk 等依赖,其在 fma-cloud 组织下,但未在 github 上找到该组织:

Software: cpprestsdk
Repo: https://github.com/fma-cloud/cpprestsdk.git
License: MIT

Software: lmdb
Repo: 
License: OpenLDAP Public

Software: jwt-cpp
Repo: https://github.com/fma-cloud/jwt-cpp.git
License: MIT

How does TuGraph support vertex/edge deletion?

Dear authors,

Thanks for releasing the source code of TuGraph. I am wondering how does TuGraph support vertex/edge deletion, since I cannot find it in the document. Do I have to stop the server and overwrite the entire graph to delete a small part of the graph? Or there is any online method to do so? Thanks!

A issue test for Slack connection

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • OS: [e.g. Ubuntu 18.04]
  • CPU: [e.g. Intel Xeon xxxx]
  • Compiler: [e.g. GCC 8.0]

Additional context
Add any other context about the problem here.

[doc] doc-zh display unfriendly for reading.

Expected Behavior

配置文件

lgraph_import工具通过指定的配置文件进行环境配置。配置文件描述输入文件的路径、它们所代表的顶点/边以及顶点/边的格式。may be long long long long long long long long text

Actual Behavior

配置文件

`lgraph_import`工具通过指定的配置文件进行环境配置。配置文件描述输入文件的路径、它们所代表的顶点/边以及顶点/边的格式。may be long long long long long long long long text

Steps to Reproduce the Problem

see Actual Behavior
Caused by too much tab/space.

Specifications

  • Version: v3.3.0
  • Platform: Windows11

Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • OS: [e.g. Ubuntu 18.04] mac
  • CPU: [e.g. Intel Xeon xxxx] Intel
  • Compiler: [e.g. GCC 8.0]

Additional context
Add any other context about the problem here.

CMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2
JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindJNI.cmake:382 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/BuildClients.cmake:18 (find_package)
src/CMakeLists.txt:10 (include)

How to use OLAP API and Graph algorithm ?

Hi,
After reading doc, I still be confused about how to use OLAP API and graph algorithm.
Do we have to implement their own stored procedure, compile it, upload .so file or python file to server.
Then graph algorithm(like pagerank) are available by calling this stored procedure through sdk.

^_^

「Restful api 」only create vertex index and fail when create edge index

Describe the bug
Related api: POST http://{host}:{port}/db/{graph_name}/index/{label}/{field}
It only creates 「vertex index」, when try to create 「edge index」 it failed.

To Reproduce
Steps to reproduce the behavior:
1.Post a request which create edge index with edge label.
2.It will then return 400 error.

Expected behavior
According to the description of this method, all index creation includes 「vertex index」、「edge index」.
So this api should apply to create edge index.

Screenshots
image
image

Environment:

  • OS: Ubuntu 20.04 LTS (GNU/Linux 5.15.30-2-pve x86_64)
  • CPU: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz
  • Compiler: GCC 5.4.0

Additional context
Related Code:
image

The bug here only deal with AddVertexIndex method, miss AddEdgeIndex senareo.
So fix code is to add a branch here.
I wonder if I can create a pr to fix this bug or just waiting for the next exciting version.🤔

Increase Kafka streams support

I have a future request for getting changed data capture from kafka streams when having to query real-time data being from other databases in TuGraph.

I consider adding third-party libraries for TuGraph integration like librdkafka and increase kafka client for polling and executing
cypher query.Would you hava plans to support Kafka Connector in future?

Does TuGraph-db support fulltext index?

Hi,
I'm confused about whether the fullText index API in cypher is available.
I ran a docker example of TuGraph on version 3.3.0 and saw 'FullTextIndex' API when using 'call dbms.procedures'.
Then I test the creating index query by Java client and it threw an exception.
Exception in thread "main" com.alipay.tugraph.TuGraphRpcException:Fulltext index is not enabled at com.alipay.tugraph.TuGrpahRpcClient.handleCypherRequest(TuGraphRpcClient.java:68) ...
I have created the node ‘person’ before. Here is my code:
String response=client.callCypher("call db.addFullTextIndex(true,\"person\",\"name\")","Default",10);

Does TuGraph-db support fullText index and query? Could you give some explanations on doc?

服务突然挂死,时间都是早上10点56分

我这边在linux环境用docker部署了一个tugraph,9月9日早上10:56分挂了一次,今天早上10:56分又挂了一次,是后台有定时任务导致的吗?异常日志如下:
20220914025604.391: [HaStateMachine] Fail to read from Socket{id=17179869299 fd=31 addr=192.168.56.78:49486:9090} (0x7f8dc001f1d0): Connection reset by peer
20220914025604.391: [HaStateMachine] Fail to read from Socket{id=230 fd=42 addr=192.168.56.78:49492:9090} (0x7f8da401fda0): Connection reset by peer
20220914025604.391: [HaStateMachine] Fail to read from Socket{id=8589934821 fd=40 addr=192.168.56.78:49491:9090} (0x7f8da401fb60): Connection reset by peer
20220914025604.391: [HaStateMachine] Fail to read from Socket{id=34359738707 fd=38 addr=192.168.56.78:49489:9090} (0x7f8da802d350): Connection reset by peer
20220914025604.391: [HaStateMachine] Fail to read from Socket{id=25769804116 fd=28 addr=192.168.56.78:49484:9090} (0x7f8da802d590): Connection reset by peer
20220914025604.392: [HaStateMachine] Fail to read from Socket{id=34359738594 fd=32 addr=192.168.56.78:49487:9090} (0x7f8da401f4a0): Connection reset by peer
20220914025604.392: [HaStateMachine] Fail to read from Socket{id=34359738482 fd=35 addr=192.168.56.78:49488:9090} (0x7f8dc001ef90): Connection reset by peer
20220914025604.393: [HaStateMachine] Fail to read from Socket{id=25769804118 fd=30 addr=192.168.56.78:49485:9090} (0x7f8da802da10): Connection reset by peer
20220914025612.440: [StateMachine] Apply a acl request.
20220914025612.456: [StateMachine] Apply a cypher request.
20220914025612.456: [server.cypher.execution_plan] Plan cache disabled.
20220914025612.456: [cypher.execution_plan] Current Pattern Graph:
20220914025612.456: [cypher.execution_plan] (EMPTY GRAPH)
20220914025612.456: [cypher.execution_plan] Execution Plan:
20220914025612.456: [cypher.execution_plan] Produce Results
20220914025612.456: [cypher.execution_plan] Standalone Call []

Error: signal 11:
lgraph_server[0xc99728]
/lib64/libpthread.so.0(+0xf630)[0x7f8ddd159630]
/lib64/libc.so.6(+0x154cb5)[0x7f8dda8a7cb5]
/usr/local/lib64/libstdc++.so.6(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x6b)[0x7f8ddcee601b]
/usr/local/lib64/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x17e)[0x7f8ddced7aae]
/usr/local/lib64/liblgraph.so(_ZN6lgraph12TryDeleteLogERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1e4)[0x7f8dddce6304]
/usr/local/lib64/liblgraph.so(_ZN6lgraph3WalD1Ev+0x94)[0x7f8dddce3214]
/usr/local/lib64/liblgraph.so(_ZN6lgraph7KvStoreD2Ev+0x2e)[0x7f8dddb42c2e]
/usr/local/lib64/liblgraph.so(_ZN6lgraph14LightningGraph11DropAllDataEv+0x2c8)[0x7f8dddb623c8]
/usr/local/lib64/liblgraph.so(_ZN6lgraph18AccessControlledDB11DropAllDataEv+0x17)[0x7f8dddd07347]
lgraph_server(_ZN6cypher16BuiltinProcedure8DbDropDBEPNS_9RTContextEPKNS_6RecordERKSt6vectorIN6parser10ExpressionESaIS8_EERKS6_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISI_EEPS6_IS3_SaIS3_EE+0x71)[0xbfec01]
lgraph_server(_ZN6cypher14StandaloneCall11RealConsumeEPNS_9RTContextE+0x433)[0xc9a553]
lgraph_server(_ZN6cypher6OpBase7ConsumeEPNS_9RTContextE+0xa)[0xbb87aa]
lgraph_server(_ZN6cypher14ProduceResults11RealConsumeEPNS_9RTContextE+0x3c)[0xc8ed3c]
lgraph_server(_ZN6cypher6OpBase7ConsumeEPNS_9RTContextE+0xa)[0xbb87aa]
lgraph_server(_ZN6cypher13ExecutionPlan7ExecuteEPNS_9RTContextE+0x7cd)[0xc5236d]
lgraph_server(_ZN6cypher9Scheduler4EvalEPNS_9RTContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_11ElapsedTimeE+0x292)[0xb86972]
lgraph_server(_ZN6lgraph12StateMachine18ApplyCypherRequestEPKNS_13LGraphRequestEPNS_14LGraphResponseEb+0x439)[0xab1499]
lgraph_server(_ZN6lgraph12StateMachine20ApplyRequestDirectlyEPKNS_13LGraphRequestEPNS_14LGraphResponseEb+0x273)[0xab27a3]
lgraph_server(_ZN6lgraph12StateMachine9DoRequestEbPKNS_13LGraphRequestEPNS_14LGraphResponseEPN6google8protobuf7ClosureEb+0x19)[0xab3749]
lgraph_server(_ZN6lgraph12StateMachine13HandleRequestEPN6google8protobuf13RpcControllerEPKNS_13LGraphRequestEPNS_14LGraphResponseEPNS2_7ClosureEb+0xc2)[0xaa7ec2]
/usr/local/lib64/liblgraph.so(_ZN6lgraph16LGraphRPCService10CallMethodEPKN6google8protobuf16MethodDescriptorEPNS2_13RpcControllerEPKNS2_7MessageEPS8_PNS2_7ClosureE+0x85)[0x7f8dddd555d5]
lgraph_server(_ZN4brpc6policy17ProcessRpcRequestEPNS_16InputMessageBaseE+0x1159)[0x10da6b9]
lgraph_server(_ZN4brpc19ProcessInputMessageEPv+0x7)[0x10d3a67]
lgraph_server(_ZN4brpc14InputMessenger13OnNewMessagesEPNS_6SocketE+0x653)[0x10d4ac3]
lgraph_server(_ZN4brpc6Socket12ProcessEventEPv+0xd)[0xff09ad]
lgraph_server(_ZN7bthread9TaskGroup11task_runnerEl+0xc1)[0x1074121]
lgraph_server(bthread_make_fcontext+0x21)[0x1054071]
(END)

An exception is thrown when executing the Cypher query "MATCH (n0) OPTIONAL MATCH (n0)-->(n1) RETURN *"

Describe the bug
When I used the Java client to execute the following Cypher query:

MATCH (n0) OPTIONAL MATCH (n0)-->(n1) RETURN *

An exception occurred:

com.alipay.tugraph.TuGraphRpcException: CypherException: Function not implemented yet: AddClause at :211

Expected behavior
No error occurs because this Cypher query is syntactically correct and valid and the doc says that "OPTIONAL MATCH is supported" .

Environment:

  • OS: MacOS 10.15.7
  • Version: TuGraph 3.3.0 docker, Java client

这个非常不稳定,莫名其妙就挂了

用了一天,容器会莫名的挂掉,正在使用的过程中挂掉,重启不来,数据没有挂载到其他地方,只能删除容器重新来过,重来两次就放弃了,极不稳定,也不会报什么异常

build failed with cannot find dependencies

Build failed with following error, seems deps/build_deps.sh does not handle all dependencies.

In file included from /home/codesigner/Data/tugraph-db/src/client/cpp/rpc/lgraph_rpc_client.cpp:5: /home/codesigner/Data/tugraph-db/src/client/cpp/rpc/lgraph_rpc.h:11:10: fatal error: brpc/server.h: No such file or directory 11 | #include "brpc/server.h" | ^~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/liblgraph_rpc_client.dir/build.make:83: src/CMakeFiles/liblgraph_rpc_client.dir/client/cpp/rpc/lgraph_rpc_client.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 2%] Building CXX object src/CMakeFiles/lgraph.dir/core/data_type.cpp.o In file included from /home/codesigner/Data/tugraph-db/src/client/cpp/restful/rest_client.cpp:3: /home/codesigner/Data/tugraph-db/src/client/cpp/restful/rest_client.h:7:10: fatal error: cpprest/json.h: No such file or directory 7 | #include "cpprest/json.h" | ^~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/lgraph_rest_client.dir/build.make:83: src/CMakeFiles/lgraph_rest_client.dir/client/cpp/restful/rest_client.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 2%] Building CXX object src/CMakeFiles/lgraph.dir/core/edge_index.cpp.o In file included from /home/codesigner/Data/tugraph-db/src/db/galaxy.h:24, from /home/codesigner/Data/tugraph-db/src/lgraph_api/lgraph_galaxy.cpp:4: /home/codesigner/Data/tugraph-db/src/db/token_manager.h:9:10: fatal error: jwt-cpp/jwt.h: No such file or directory 9 | #include "jwt-cpp/jwt.h" | ^~~~~~~~~~~~~~~ `

In ci/images/centos7/Dockerfile, I find the brpc directory as copied to docker, so which brpc version do you use.
COPY brpc /brpc RUN cd /brpc && mkdir build && cd build \ && cmake $CMAKE_OPT -DBUILD_UNIT_TESTS=0 .. && make -j && make install \ && rm -rf /brpc*

Response of the restful api can not deserialize to the types generated from ha.proto

Describe the bug
the type of 'CypherResult.Result' is 'RepeatedField < ListOfProtoFieldData > '. serialized json should be like '[{"values":[xxx]}]' when calling function 'Google.Protobuf.JsonFormatter.Default.Format', while the json responsed from restful api "/cypher" is like '[[xxx]]'.
exception 'Google.Protobuf.InvalidProtocolBufferException:“Expected an object”' catched when calling function 'CypherResult.Parser.ParseJson'.

To Reproduce
Steps to reproduce the behavior:

  1. protoc ha.proto --csharp_out .
  2. var json = "{"elapsed":0.0003452301025390625,"header":[{"name":"n","type":1}],"result":[["{\"identity\":0,\"label\":\"person\",\"properties\":{\"born\":1961,\"id\":2,\"name\":\"Laurence Fishburne\",\"poster_image\":\"https://image.tmdb.org/t/p/w185/mh0lZ1XsT84FayMNiT6Erh91mVu.jpg\"}}"]],"size":1}";
  3. var result = CypherResult.Parser.ParseJson(json);
  4. See error

Some graph model and schema questions

  1. Each vertex and edge must have a label. Can a vertex have two labels? Is there any plan to support a label-less vertex, i.e., a vertex without any label? (TuGraph不支持创建空的nodes,不支持多labels)
  2. Is the label indexed by default as Neo4j does? Or only the properties/fields can be indexed but not the label itself.
  3. Each graph can have its own access control configurations. Can the admin set ACL on the property/field level (column, in the sense of RDMBS), label level(row), or only the graph level (table)?
  4. Can the admin create a new Graph or GraphView (in the term of RDBMS) based on the other Graph (share with the same data)?
  5. Is there any constraint/schema to specify which type/label of a vertex can connect to a given type/label of an edge? (constraints (only edge has))
  6. Is dangling edge allowed? (e.g., An edge without src vertex)
  7. Is the primary key must provide in the Create clause? Is it indexed by default?
  8. lgraph_api::Galaxy and **Scope:** whole instance. What's the difference between Galaxy and instance? Is instance the same as lgraph_api::GraphDB?

THX

Can be compiled and run on Win10?

I tried to compile the project using MingW 5.4.0 and cmake 2.8.12 and followed your process. But I had problems building dependencies.

$ deps/build_deps.sh
======================================
Building antlr4
======================================
-- Building for: NMake Makefiles
-- Building without demo. To enable demo build use: -DWITH_DEMO=True
CMake Warning at CMakeLists.txt:26 (project):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
CMake Warning at D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:64 (enable_language):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.
Call Stack (most recent call first):
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
  CMakeLists.txt:26 (project)


CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found.   Please set CMAKE_RC_COMPILER to a valid compiler path or name.
-- Check for working C compiler: D:/IDE/mingw64/bin/gcc.exe
CMake Warning at CMakeLists.txt:2 (PROJECT):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.


CMake Warning at D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:64 (enable_language):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.
Call Stack (most recent call first):
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
  CMakeLists.txt:2 (PROJECT)


CMake Error at D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:64 (enable_language)
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
  D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (include)
  CMakeLists.txt:2 (PROJECT)


CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: D:/IDE/mingw64/bin/gcc.exe -- broken
CMake Error at D:/IDE/cmake-2.8.12-win32-x86/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "D:/IDE/mingw64/bin/gcc.exe" is not able to compile a simple
  test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:26 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Users/DB/Desktop/TuGraph/tugraph-db/deps/build/antlr4/CMakeFiles/CMakeOutput.log".
See also "C:/Users/DB/Desktop/TuGraph/tugraph-db/deps/build/antlr4/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
Failed to build antlr4
/c/Users/DB/Desktop/TuGraph/tugraph-db

无法编译算法插件

我阅读了官方文档【1.tutorial】一节,根据文档提示进行Procedure编译与运行,将github【tugraph-db】仓库中plugins文件夹拷贝至服务器中,执行bash make_so.sh bfs,却提示找不到liblgraph.so文件

请问支持子图复制么

请问支持子图复制么,我的需求是对子图做版本管理,想到的一种方法是将某子图整体复制给一个新的快照子图

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.