Skip to content

Commit

Permalink
Merge branch 'master' into check/create-edge-index
Browse files Browse the repository at this point in the history
  • Loading branch information
Shylock-Hg authored Jul 14, 2020
2 parents 0e5fd33 + 535de17 commit 3457a9e
Show file tree
Hide file tree
Showing 452 changed files with 6,911 additions and 20,099 deletions.
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ Please clarify why the changes are needed. For instance,
2. If you fix a bug, you can clarify why it is a bug.
-->

### Will break the compatibility? How if so?
<!--
Please label `alert/break' if so, such as
1. nGQL grammar changes;
2. RPC protocol can't be compatible with previous, refer to https://diwakergupta.github.io/thrift-missing-guide/#_versioning_compatibility;
3. Storage format; etc.
-->

### Does this PR introduce any user-facing change?
<!--
Expand All @@ -35,3 +42,10 @@ If tests were added, say they were added here. Please make sure to add some test
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->

### Checklist
<!--Tick the checkbox(es) below to choose what you have done.-->

- [ ] I've run the tests to see all new and existing tests pass
- [ ] If this Pull Request resolves an issue, I linked to the issue in the text above
- [ ] I've informed the technical writer about the documentation change if necessary
9 changes: 5 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
continue-on-error: false
working-directory: build
env:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: /opt/vesoft/toolset/clang/9.0.0/bin/llvm-symbolizer
ASAN_OPTIONS: fast_unwind_on_malloc=1
run: |
ctest \
Expand All @@ -84,7 +84,7 @@ jobs:
timeout-minutes: 40
working-directory: build
env:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: /opt/vesoft/toolset/clang/9.0.0/bin/llvm-symbolizer
ASAN_OPTIONS: fast_unwind_on_malloc=0
run: |
ctest \
Expand All @@ -96,8 +96,9 @@ jobs:
if: success() && matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7'
run: |
set -e
fastcov -o coverage.info -g $GCOV -l --exclude=/opt/vesoft/ --exclude=scanner.lex
bash <(curl -s https://codecov.io/bash) -Z -f coverage.info
fastcov -o coverage.info -g $GCOV -l --exclude=scanner.lex
lcov --remove coverage.info '*/opt/vesoft/*' -o clean.info
bash <(curl -s https://codecov.io/bash) -Z -f clean.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: bash
15 changes: 6 additions & 9 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,16 @@ jobs:
-DENABLE_ASAN=on \
-B build/
- name: Make
if: (matrix.compiler != 'gcc-9.2' || matrix.os != 'centos7') && steps.ignore_docs.outputs.num_source_files != 0
if: steps.ignore_docs.outputs.num_source_files != 0
run: |
cmake --build build/ -j $(nproc)
- name: Make with less concurrency
if: matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7' && steps.ignore_docs.outputs.num_source_files != 0
run: |
cmake --build build/ -j $(($(nproc)/2))
- name: CTest with multiple threads
if: steps.ignore_docs.outputs.num_source_files != 0
timeout-minutes: 15
continue-on-error: false
working-directory: build
env:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: /opt/vesoft/toolset/clang/9.0.0/bin/llvm-symbolizer
ASAN_OPTIONS: fast_unwind_on_malloc=1
run: |
ctest \
Expand All @@ -99,7 +95,7 @@ jobs:
timeout-minutes: 30
working-directory: build
env:
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: /opt/vesoft/toolset/clang/9.0.0/bin/llvm-symbolizer
ASAN_OPTIONS: fast_unwind_on_malloc=0
run: |
ctest \
Expand All @@ -111,8 +107,9 @@ jobs:
if: success() && matrix.compiler == 'gcc-9.2' && matrix.os == 'centos7' && steps.ignore_docs.outputs.num_source_files != 0
run: |
set -e
fastcov -o coverage.info -l --exclude=/opt/vesoft/ --exclude=scanner.lex
bash <(curl -s https://codecov.io/bash) -Z -t $(cat /etc/action/secrets/codecov) -f coverage.info
fastcov -o coverage.info -l --exclude=scanner.lex
lcov --remove coverage.info '*/opt/vesoft/*' -o clean.info
bash <(curl -s https://codecov.io/bash) -Z -t $(cat /etc/action/secrets/codecov) -f clean.info
shell: bash
- name: Cleanup
if: always()
Expand Down
33 changes: 25 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ include(LinkerConfig)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")

set(CMAKE_SKIP_RPATH TRUE)

Expand All @@ -53,10 +54,13 @@ option(ENABLE_COVERAGE "Whether to turn unit test coverage ON or OFF" OFF)
option(ENABLE_UBSAN "Whether to turn Undefined Behavior Sanitizer ON or OFF" OFF)
option(ENABLE_FUZZ_TEST "Whether to turn Fuzz Test ON or OFF" OFF)
option(ENABLE_WERROR "Whether to error on warnings" ON)
option(ENABLE_STRICT_ALIASING "Whether to turn strict-aliasing ON or OFF" OFF)
option(ENABLE_TSAN "Whether to turn Thread Sanitizer ON or OFF" OFF)
option(ENABLE_STATIC_ASAN "Whether directs the GCC driver to link libasan statically" OFF)
option(ENABLE_STATIC_UBSAN "Whether directs the GCC driver to link libubsan statically" OFF)
option(ENABLE_PACK_ONE "Whether to package into one" ON)
option(ENABLE_PCH "Whether to enable use of precompiled header" OFF)
option(ENABLE_FRAME_POINTER "Whether to build with -fno-omit-frame-pointer" ON)

message(STATUS "ENABLE_ASAN: ${ENABLE_ASAN}")
message(STATUS "ENABLE_TESTING: ${ENABLE_TESTING}")
Expand All @@ -65,9 +69,10 @@ message(STATUS "ENABLE_FUZZ_TEST: ${ENABLE_FUZZ_TEST}")
message(STATUS "ENABLE_TSAN: ${ENABLE_TSAN}")
message(STATUS "ENABLE_STATIC_ASAN : ${ENABLE_STATIC_ASAN}")
message(STATUS "ENABLE_STATIC_UBSAN : ${ENABLE_STATIC_UBSAN}")


add_compile_options(-fno-strict-aliasing)
message(STATUS "ENABLE_WERROR: ${ENABLE_WERROR}")
message(STATUS "ENABLE_STRICT_ALIASING: ${ENABLE_STRICT_ALIASING}")
message(STATUS "ENABLE_PCH: ${ENABLE_PCH}")
message(STATUS "ENABLE_FRAME_POINTER: ${ENABLE_FRAME_POINTER}")

if (ENABLE_NATIVE)
message(STATUS "ENABLE_NATIVE is ${ENABLE_NATIVE}")
Expand Down Expand Up @@ -125,6 +130,9 @@ endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--compress-debug-sections=zlib")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-fno-limit-debug-info)
endif()
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down Expand Up @@ -258,9 +266,12 @@ find_package(FLEX REQUIRED)
find_package(Readline REQUIRED)
find_package(NCURSES REQUIRED)
find_package(LibLZMA MODULE)
if(NOT ENABLE_ASAN AND NOT ENABLE_NATIVE)
if(ENABLE_PCH AND NOT ENABLE_ASAN AND NOT ENABLE_NATIVE)
find_package(PCHSupport)
add_compile_options(-Winvalid-pch)
else()
# Remove if existing
file(REMOVE ${CMAKE_SOURCE_DIR}/src/common/base/Base.h.gch)
endif()

add_compile_options(-Wall)
Expand All @@ -275,6 +286,16 @@ if(ENABLE_WERROR)
add_compile_options(-Werror)
endif()

if(NOT ENABLE_STRICT_ALIASING)
add_compile_options(-fno-strict-aliasing)
endif()

if(ENABLE_FRAME_POINTER)
add_compile_options(-fno-omit-frame-pointer)
else()
add_compile_options(-fomit-frame-pointer)
endif()

include(CheckCXXCompilerFlag)

# TODO(dutor) Move all compiler-config-related operations to a separate file
Expand Down Expand Up @@ -327,7 +348,6 @@ if(ENABLE_ASAN)
endif()
add_compile_options(-fsanitize=address)
add_compile_options(-g)
add_compile_options(-fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
endif()

Expand All @@ -343,7 +363,6 @@ if(ENABLE_TSAN)
set(ENV{TSAN_OPTIONS} "report_atomic_races=0")
add_compile_options(-fsanitize=thread)
add_compile_options(-g)
add_compile_options(-fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
endif()

Expand All @@ -356,14 +375,12 @@ if(ENABLE_UBSAN)
add_compile_options(-static-libubsan)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libubsan")
endif()
add_compile_options(-static-libubsan)
add_compile_options(-fsanitize=undefined -fno-sanitize=alignment)
add_compile_options(-fno-sanitize-recover=all) # Exit on failure
# TODO(dutor) Remove the following line when RTTI-enabled RocksDB is ready
add_compile_options(-fno-sanitize=vptr)
if(NOT ENABLE_ASAN)
add_compile_options(-g)
add_compile_options(-fno-omit-frame-pointer)
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
endif()
Expand Down
51 changes: 43 additions & 8 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
# Contributor Covenant Code of Conduct

Currently we use clang-format to format the code. We recommend you to configure the clang-format according to the IDE / editor you use. The following link is how to configure vim / emacs / vscode to use clang-format.

- Vim
https://github.com/rhysd/vim-clang-format
- Emacs
https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/clang-format.el
- VS Code
https://code.visualstudio.com/docs/cpp/cpp-ide#_code-formatting
## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@vesoft.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
See [How to contribute](https://github.com/vesoft-inc/nebula/blob/master/docs/manual-EN/4.contributions/how-to-contribute.md) for details about how to contribute to **Nebula Graph**.
# CONTRIBUTING

See [How to contribute](https://docs.nebula-graph.io/manual-EN/4.contributions/how-to-contribute/) for details about how to contribute to **Nebula Graph**.
61 changes: 32 additions & 29 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
</a>
</p>

# Nebula Graph是什么?
# Nebula Graph 是什么

**Nebula Graph** 是一款开源的图数据库,擅长处理千亿个顶点和万亿条边的超大规模数据集。

下图为 **Nebula Graph** 产品架构图:

![image](https://github.com/vesoft-inc/nebula-docs/raw/master/images/Nebula%20Arch.png)

与其他图数据库产品相比,**Nebula Graph** 具有如下优势:

* 全对称分布式架构
Expand All @@ -33,58 +37,57 @@
* 类 SQL 查询语言
* 用户鉴权

## 产品路线图
## 快速使用

**Nebula Graph** 产品规划路线图请参见 [roadmap](https://github.com/vesoft-inc/nebula/wiki/Nebula-Graph-Roadmap-2019)
请查看[快速使用手册](https://docs.nebula-graph.com.cn/manual-CN/4.contributions/how-to-contribute/),开始使用 **Nebula Graph**

## 图可视化
在开始使用 **Nebula Graph** 之前,必须通过[编译源码](https://docs.nebula-graph.com.cn/manual-CN/3.build-develop-and-administration/1.build/1.build-source-code/)[rpm/deb 包](https://docs.nebula-graph.com.cn/manual-CN/3.build-develop-and-administration/2.install/1.install-with-rpm-deb/) 或者 [docker compose](https://github.com/vesoft-inc/nebula-docker-compose/blob/master/README_zh-CN.md) 方式安装 **Nebula Graph**。您也可以观看[视频](https://space.bilibili.com/472621355)学习如何安装 **Nebula Graph**

查看[图可视化](https://github.com/vesoft-inc/nebula-web-docker),开启图数据可视化探索之旅
如果您遇到任何问题,请前往 Nebula Graph [官方论坛](https://discuss.nebula-graph.com.cn) 提问

## 支持的客户端
* [Go](https://github.com/vesoft-inc/nebula-go)
* [Python](https://github.com/vesoft-inc/nebula-python)
* [Java](https://github.com/vesoft-inc/nebula-java)
## 文档

## 快速使用
* [简体中文](https://docs.nebula-graph.com.cn/)
* [English](https://docs.nebula-graph.io/)

请查看[快速使用手册](docs/manual-CN/1.overview/2.quick-start/1.get-started.md),开始使用 **Nebula Graph**
## 产品路线图

在开始使用 **Nebula Graph** 之前,必须通过[编译源码](https://github.com/vesoft-inc/nebula/blob/master/docs/manual-EN/3.build-develop-and-administration/1.build/1.build-source-code.md)[rpm/deb 包](https://github.com/vesoft-inc/nebula/tree/master/docs/manual-CN/3.build-develop-and-administration/3.deploy-and-administrations/deployment/install-with-rpm-deb.md) 或者 [docker compose](https://github.com/vesoft-inc/nebula-docker-compose) 方式安装 **Nebula Graph**。您也可以观看[视频](https://space.bilibili.com/472621355)学习如何安装 **Nebula Graph**
**Nebula Graph** 产品规划路线图请参见 [roadmap](https://github.com/vesoft-inc/nebula/wiki/Nebula-Graph-Roadmap)

## 获取帮助
## 可视化工具:Nebula Graph Studio

在使用 **Nebula Graph** 过程中遇到任何问题,都可以通过下面的方式寻求帮助:
查看图可视化工具[Nebula Graph Studio](https://github.com/vesoft-inc/nebula-web-docker),开启图数据可视化探索之旅。

* [知乎](https://www.zhihu.com/org/nebulagraph/activities)
* [SegmentFault](https://segmentfault.com/t/nebula)
* [官方论坛](https://discuss.nebula-graph.io)
## 支持的客户端

## 文档
* [Go](https://github.com/vesoft-inc/nebula-go)
* [Python](https://github.com/vesoft-inc/nebula-python)
* [Java](https://github.com/vesoft-inc/nebula-java)

* [简体中文](https://github.com/vesoft-inc/nebula/blob/master/docs/manual-CN/README.md)
* [English](https://github.com/vesoft-inc/nebula/blob/master/docs/manual-EN/README.md)
## 许可证

## Nebula Graph 产品架构图
**Nebula Graph** 使用 [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) 许可证,您可以免费下载,修改以及部署源代码。您还可以将 **Nebula Graph** 作为后端服务部署以支持您的 SaaS 部署。

![image](https://github.com/vesoft-inc/nebula-docs/raw/master/images/Nebula%20Arch.png)
为防止云供应商从项目赢利而不回馈,**Nebula Graph** 在项目中添加了 [Commons Clause 1.0](https://commonsclause.com/) 条款。如上所述,**Nebula Graph** 是一个完全开源的项目,欢迎您就许可模式提出建议,帮助 **Nebula Graph** 社区更好地发展。

## 如何贡献

**Nebula Graph** 是一个完全开源的项目,欢迎开源爱好者通过以下方式参与到 **Nebula Graph** 社区:

* 从标记为 [good first issues](https://github.com/vesoft-inc/nebula/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) 的问题入手
* 贡献代码,详情请参见 [如何贡献](docs/manual-CN/4.contributions/how-to-contribute.md)
* 贡献代码,详情请参见 [如何贡献](https://docs.nebula-graph.com.cn/manual-CN/4.contributions/how-to-contribute/)
* 直接在GitHub上提 [Issue](https://github.com/vesoft-inc/nebula/issues)

## 许可证

**Nebula Graph** 使用 [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) 许可证,您可以免费下载,修改以及部署源代码。您还可以将 **Nebula Graph** 作为后端服务部署以支持您的 SaaS 部署。

为防止云供应商从项目赢利而不回馈,**Nebula Graph** 在项目中添加了 [Commons Clause 1.0](https://commonsclause.com/) 条款。如上所述,**Nebula Graph** 是一个完全开源的项目,欢迎您就许可模式提出建议,帮助 **Nebula Graph** 社区更好地发展。
## 获取帮助 & 联系方式

## 联系方式
在使用 **Nebula Graph** 过程中遇到任何问题,都可以通过下面的方式寻求帮助:

* [官方论坛](https://discuss.nebula-graph.com.cn/)
* 访问官网 [Home Page](http://nebula-graph.io/)
* [![WeiXin](https://img.shields.io/badge/WeChat-%E5%BE%AE%E4%BF%A1-brightgreen)](https://user-images.githubusercontent.com/38887077/67449282-4362b300-f64c-11e9-878f-7efc373e5e55.jpg)
* [![Sina Weibo](https://img.shields.io/badge/Weibo-%E5%BE%AE%E5%8D%9A-red)](https://weibo.com/p/1006067122684542/home?from=page_100606&mod=TAB#place)
* email: info@vesoft.com

如果喜欢 **Nebula Graph**,请为我们点 star。<a href="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default">
<img src="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default" alt="nebula star"/>
</a>
Loading

0 comments on commit 3457a9e

Please sign in to comment.