Skip to content

Commit

Permalink
Step1 use 3rdparty v3 (#3554)
Browse files Browse the repository at this point in the history
* Switched to use third-party v3

1) Switched from HeaderClientChannel to the RocketChannel
   (common/thrif/ThriftClientManager-inc.h)
2) Fixed a bug in common/process/ProcessUtils.cpp
3) Fixed all UT
4) 99.9% of changes are mechanical: set_xxx(yyy)  ==> xxx_ref() = yyy
5) Only allow empty functions on a single line
  • Loading branch information
sherman-the-tank authored Dec 23, 2021
1 parent f670c68 commit 61d8ad5
Show file tree
Hide file tree
Showing 566 changed files with 11,669 additions and 6,957 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
Expand Down
3 changes: 1 addition & 2 deletions cmake/nebula/ThirdPartyConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message(">>>> Configuring third party for '${PROJECT_NAME}' <<<<")
# 4. /opt/vesoft/third-party, if exists
# 5. At last, one copy will be downloaded and installed to ${CMAKE_BINARY_DIR}/third-party/install

set(NEBULA_THIRDPARTY_VERSION "2.0")
set(NEBULA_THIRDPARTY_VERSION "3.0")

if(${DISABLE_CXX11_ABI})
SET(NEBULA_THIRDPARTY_ROOT ${CMAKE_BINARY_DIR}/third-party-98/install)
Expand Down Expand Up @@ -116,7 +116,6 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L ${NEBULA_THIRDPARTY_ROO
# All thrift libraries
set(THRIFT_LIBRARIES
thriftcpp2
rocketupgrade
async
thriftprotocol
transport
Expand Down
340 changes: 171 additions & 169 deletions src/clients/meta/MetaClient.cpp

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/clients/meta/MetaClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,13 @@ class MetaClient {

folly::Future<StatusOr<bool>> ingest(GraphSpaceID spaceId);

HostAddr getMetaLeader() { return leader_; }
HostAddr getMetaLeader() {
return leader_;
}

int64_t HeartbeatTime() { return heartbeatTime_; }
int64_t HeartbeatTime() {
return heartbeatTime_;
}

protected:
// Return true if load succeeded.
Expand Down
18 changes: 9 additions & 9 deletions src/clients/storage/InternalStorageClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void InternalStorageClient::chainUpdateEdge(cpp2::UpdateEdgeRequest& reversedReq
VLOG(1) << "leader host: " << leader;

cpp2::ChainUpdateEdgeRequest chainReq;
chainReq.set_update_edge_request(reversedRequest);
chainReq.set_term(termOfSrc);
chainReq.update_edge_request_ref() = reversedRequest;
chainReq.term_ref() = termOfSrc;
if (optVersion) {
chainReq.set_edge_version(optVersion.value());
chainReq.edge_version_ref() = optVersion.value();
}
auto resp = getResponse(
evb,
Expand Down Expand Up @@ -120,13 +120,13 @@ cpp2::ChainAddEdgesRequest InternalStorageClient::makeChainAddReq(const cpp2::Ad
TermID termId,
folly::Optional<int64_t> ver) {
cpp2::ChainAddEdgesRequest ret;
ret.set_space_id(req.get_space_id());
ret.set_parts(req.get_parts());
ret.set_prop_names(req.get_prop_names());
ret.set_if_not_exists(req.get_if_not_exists());
ret.set_term(termId);
ret.space_id_ref() = req.get_space_id();
ret.parts_ref() = req.get_parts();
ret.prop_names_ref() = req.get_prop_names();
ret.if_not_exists_ref() = req.get_if_not_exists();
ret.term_ref() = termId;
if (ver) {
ret.set_edge_version(ver.value());
ret.edge_version_ref() = ver.value();
}
return ret;
}
Expand Down
Loading

0 comments on commit 61d8ad5

Please sign in to comment.