Skip to content
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

Fixed an issue where the server still started with a wrong ip/host. #3057

Merged
merged 4 commits into from
Oct 19, 2021

Conversation

CPWstatic
Copy link
Contributor

Close #2932 first.
graph, meta, storage now bind to 0.0.0.0 automatically. The configuration of local_ip is only used as an identifier of local host for graph and meta.
I found that issue #2932 has another one problem. Now the meta identify the graph/storage through the local_ip we talk above which makes overwritten problem when the local_ip is duplicated.

@CPWstatic CPWstatic added the ready-for-testing PR: ready for the CI test label Oct 13, 2021
@Sophie-Xie Sophie-Xie added this to the v2.6.0 milestone Oct 14, 2021
@CPWstatic CPWstatic assigned CPWstatic and unassigned CPWstatic Oct 14, 2021
@Sophie-Xie Sophie-Xie added the cherry-pick-v2.6 PR: need cherry-pick to this version label Oct 14, 2021
Comment on lines 327 to 328
auto result = std::find_if(
ips.begin(), ips.end(), [hostOrIp](const auto& val) { return hostOrIp == val; });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto iter = std::find(ips.begin(), ips.end(), hostOrIp);

Comment on lines 335 to 338
auto hostStatus = resolveHost(hostOrIp, 0);
if (!hostStatus.ok()) {
return hostStatus.status();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NG_RETURN_IF_ERROR(resolveHost(hostOrIp, 0));

Comment on lines 313 to 315
const std::regex ipv4(
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"((25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]{1,2})"

"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)");
if (std::regex_match(hostOrIp, ipv4)) {
const std::regex loopbackOrAny(
"^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^(?:0*\\:)*?:?0*1$|0\\.0\\.0\\.0");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^(?:0*\\:)*?:?0*1$|(0\\.){3}0"

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2021

Codecov Report

Merging #3057 (1aee757) into master (fb3be74) will increase coverage by 0.76%.
The diff coverage is 92.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3057      +/-   ##
==========================================
+ Coverage   84.30%   85.06%   +0.76%     
==========================================
  Files        1287     1287              
  Lines      115636   115720      +84     
==========================================
+ Hits        97483    98436     +953     
+ Misses      18153    17284     -869     
Impacted Files Coverage Δ
src/daemons/GraphDaemon.cpp 65.45% <66.66%> (+0.31%) ⬆️
src/daemons/MetaDaemon.cpp 62.50% <70.00%> (-0.21%) ⬇️
src/daemons/StorageDaemon.cpp 62.35% <72.72%> (+40.55%) ⬆️
src/clients/storage/GraphStorageClient.cpp 76.19% <92.20%> (+0.10%) ⬆️
src/common/network/NetworkUtils.cpp 80.89% <93.75%> (+11.76%) ⬆️
src/clients/storage/GraphStorageClient.h 100.00% <100.00%> (ø)
src/common/network/test/NetworkUtilsTest.cpp 100.00% <100.00%> (ø)
src/graph/executor/mutate/DeleteExecutor.cpp 83.22% <100.00%> (+0.33%) ⬆️
src/graph/executor/mutate/InsertExecutor.cpp 100.00% <100.00%> (ø)
src/graph/executor/mutate/UpdateExecutor.cpp 87.64% <100.00%> (+0.89%) ⬆️
... and 87 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 952eece...1aee757. Read the comment docs.

@yixinglu yixinglu merged commit 3747894 into vesoft-inc:master Oct 19, 2021
Sophie-Xie pushed a commit that referenced this pull request Oct 20, 2021
bright-starry-sky pushed a commit that referenced this pull request Oct 20, 2021
* Fixed an issue where the server still started with a wrong ip/host (#3057)

* Fix wrong local ip.

* Address comment.

* Fix alter drop (#3036)

* disable modify same col

* add test case

* refactor ddl

* fix pytest error

* address comment

Co-authored-by: Yee <[email protected]>

* fix fetch vertex properties(vertex) bug (#3120)

* fix fetch vertex properties(vertex) bug

* address comment

Co-authored-by: Yee <[email protected]>

* fix go yield bug (#3128)

* fix go yield bug

* add test case

* Remove unnecessary check (#3112)

Co-authored-by: cpw <[email protected]>
Co-authored-by: Yee <[email protected]>

* fix go mTOn filter bug (#3144)

* fix go mTOn filter bug

* add test case

* Geo spatial: 3. geography schema, data, index and optimization (#3043)

* Geo spatial: 3. geography data and index

Co-authored-by: cpw <[email protected]>
Co-authored-by: jimingquan <[email protected]>
Co-authored-by: Yee <[email protected]>
Co-authored-by: Yichen Wang <[email protected]>
Co-authored-by: jie.wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-v2.6 PR: need cherry-pick to this version ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

You can still start the graphd service if you fill in the wrong locap ip when expanding the service
5 participants