-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature/verify client version #67
Merged
Shylock-Hg
merged 26 commits into
vesoft-inc:master
from
Shylock-Hg:feature/verify-client-version
Dec 8, 2021
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4787931
Stage.
Shylock-Hg d39445b
Merge branch 'master' of github.com:vesoft-inc/nebula-cpp into featur…
Shylock-Hg 087ddf2
Add client version checking.
Shylock-Hg c40d532
Log error.
Shylock-Hg 16cea67
Tune test.
Shylock-Hg 2023f9f
Tune test.
Shylock-Hg 26b80d8
Tune test.
Shylock-Hg 175d03c
Tune test.
Shylock-Hg c50679a
Tune test.
Shylock-Hg 12cd23e
Tune test.
Shylock-Hg 07c8b37
Merge branch 'master' into feature/verify-client-version
Shylock-Hg b9b1ebc
Tune test.
Shylock-Hg c494926
Correct nebula download link.
Shylock-Hg 07ebb5f
Wait until channel is good.
Shylock-Hg d4ebc25
Tune test.
Shylock-Hg 29a49af
Tune test.
Shylock-Hg 0431b37
Tune test.
Shylock-Hg 6bf599b
Upgrade ci kernel.
Shylock-Hg 7f99067
Tune test.
Shylock-Hg 8c3c6eb
Merge branch 'master' of github.com:vesoft-inc/nebula-cpp into featur…
Shylock-Hg b286600
Try local runner.
Shylock-Hg 0c781a4
Tune test.
Shylock-Hg e4056af
Tune test.
Shylock-Hg c366e3b
Tune test.
Shylock-Hg 778bf10
Tune test.
Shylock-Hg 532a21e
Merge branch 'master' of github.com:vesoft-inc/nebula-cpp into featur…
Shylock-Hg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
/* Copyright (c) 2021 vesoft inc. All rights reserved. | ||
* | ||
* This source code is licensed under Apache 2.0 License. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <thrift/lib/cpp2/GeneratedCodeHelper.h> | ||
#include <thrift/lib/cpp2/gen/module_types_tcc.h> | ||
#include <thrift/lib/cpp2/protocol/ProtocolReaderStructReadState.h> | ||
|
||
#include <memory> | ||
|
||
#include "common/graph/GraphCpp2Ops.h" | ||
#include "common/graph/Response.h" | ||
#include "common/utils/utils.h" | ||
|
||
namespace apache { | ||
namespace thrift { | ||
|
||
/************************************** | ||
* | ||
* Ops for class VerifyClientVersionReq | ||
* | ||
*************************************/ | ||
namespace detail { | ||
|
||
template <> | ||
struct TccStructTraits<nebula::VerifyClientVersionReq> { | ||
static void translateFieldName(MAYBE_UNUSED folly::StringPiece _fname, | ||
MAYBE_UNUSED int16_t& fid, | ||
MAYBE_UNUSED apache::thrift::protocol::TType& _ftype) { | ||
if (false) { | ||
} else if (_fname == "version") { | ||
fid = 1; | ||
_ftype = apache::thrift::protocol::T_STRING; | ||
} | ||
} | ||
}; | ||
|
||
} // namespace detail | ||
|
||
inline constexpr apache::thrift::protocol::TType | ||
Cpp2Ops<::nebula::VerifyClientVersionReq>::thriftType() { | ||
return apache::thrift::protocol::T_STRUCT; | ||
} | ||
|
||
template <class Protocol> | ||
uint32_t Cpp2Ops<::nebula::VerifyClientVersionReq>::write( | ||
Protocol* proto, ::nebula::VerifyClientVersionReq const* obj) { | ||
uint32_t xfer = 0; | ||
xfer += proto->writeStructBegin("nebula::VerifyClientVersionReq"); | ||
xfer += proto->writeFieldBegin("version", apache::thrift::protocol::T_STRING, 1); | ||
xfer += proto->writeBinary(obj->version); | ||
xfer += proto->writeFieldEnd(); | ||
xfer += proto->writeFieldStop(); | ||
xfer += proto->writeStructEnd(); | ||
return xfer; | ||
} | ||
|
||
template <class Protocol> | ||
void Cpp2Ops<::nebula::VerifyClientVersionReq>::read(Protocol* proto, | ||
::nebula::VerifyClientVersionReq* obj) { | ||
apache::thrift::detail::ProtocolReaderStructReadState<Protocol> _readState; | ||
|
||
_readState.readStructBegin(proto); | ||
|
||
using apache::thrift::TProtocolException; | ||
|
||
bool isset_version = false; | ||
|
||
if (UNLIKELY(!_readState.advanceToNextField(proto, 0, 1, apache::thrift::protocol::T_STRING))) { | ||
goto _loop; | ||
} | ||
_readField_version : { | ||
proto->readBinary(obj->version); | ||
isset_version = true; | ||
} | ||
|
||
_end: | ||
_readState.readStructEnd(proto); | ||
|
||
if (!isset_version) { | ||
TProtocolException::throwMissingRequiredField("version", "nebula::VerifyClientVersionReq"); | ||
} | ||
return; | ||
|
||
_loop: | ||
if (_readState.fieldType == apache::thrift::protocol::T_STOP) { | ||
goto _end; | ||
} | ||
if (proto->kUsesFieldNames()) { | ||
apache::thrift::detail::TccStructTraits<nebula::VerifyClientVersionReq>::translateFieldName( | ||
_readState.fieldName(), _readState.fieldId, _readState.fieldType); | ||
} | ||
|
||
switch (_readState.fieldId) { | ||
case 1: { | ||
if (LIKELY(_readState.fieldType == apache::thrift::protocol::T_STRING)) { | ||
goto _readField_version; | ||
} else { | ||
goto _skip; | ||
} | ||
} | ||
default: { | ||
_skip: | ||
proto->skip(_readState.fieldType); | ||
_readState.readFieldEnd(proto); | ||
_readState.readFieldBeginNoInline(proto); | ||
goto _loop; | ||
} | ||
} | ||
} | ||
|
||
template <class Protocol> | ||
uint32_t Cpp2Ops<::nebula::VerifyClientVersionReq>::serializedSize( | ||
Protocol const* proto, ::nebula::VerifyClientVersionReq const* obj) { | ||
uint32_t xfer = 0; | ||
xfer += proto->serializedStructSize("nebula::VerifyClientVersionReq"); | ||
xfer += proto->serializedFieldSize("version", apache::thrift::protocol::T_STRING, 1); | ||
xfer += proto->serializedSizeBinary(obj->version); | ||
xfer += proto->serializedSizeStop(); | ||
return xfer; | ||
} | ||
|
||
template <class Protocol> | ||
uint32_t Cpp2Ops<::nebula::VerifyClientVersionReq>::serializedSizeZC( | ||
Protocol const* proto, ::nebula::VerifyClientVersionReq const* obj) { | ||
uint32_t xfer = 0; | ||
xfer += proto->serializedStructSize("nebula::VerifyClientVersionReq"); | ||
xfer += proto->serializedFieldSize("version", apache::thrift::protocol::T_STRING, 1); | ||
xfer += proto->serializedSizeZCBinary(obj->version); | ||
xfer += proto->serializedSizeStop(); | ||
return xfer; | ||
} | ||
|
||
} // namespace thrift | ||
} // namespace apache |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the number of cores?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Speed up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may cause other PRs' actions to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never happen.