Git Product home page Git Product logo

Comments (7)

jievince avatar jievince commented on July 22, 2024

Sorry, I don't get it. Could you paste the screenshot here?

from nebula-console.

Shylock-Hg avatar Shylock-Hg commented on July 22, 2024

e.g.

E1222 15:08:19.979668 82943 GraphService.cpp:161] Execute query: YIELD 1
E1222 15:08:25.319705 82943 GraphService.cpp:161] Execute query: return 'abc'

I just execute return 'abc', but console send YIELD 1 too.

from nebula-console.

jievince avatar jievince commented on July 22, 2024

e.g.

E1222 15:08:19.979668 82943 GraphService.cpp:161] Execute query: YIELD 1
E1222 15:08:25.319705 82943 GraphService.cpp:161] Execute query: return 'abc'

I just execute return 'abc', but console send YIELD 1 too.

When get a new connection, nebula-go will call ping(), which will execute YIELD 1.
See https://github.com/vesoft-inc/nebula-go/blob/40030d441885c03c34054391e841e8f59443e0af/connection_pool.go#L149.
nebula-cpp also did so:
https://github.com/vesoft-inc/nebula-cpp/blob/e34071fe7bfb68e2012c94fcd03be4707216c45a/src/client/ConnectionPool.cpp#L63

bool Connection::isOpen() { return ping(); }


void Connection::close() {
  if (client_ != nullptr) {
    clientLoopThread_->getEventBase()->runImmediatelyOrRunInEventBaseThreadAndWait(
        [this]() { delete client_; });
    client_ = nullptr;
  }
}


bool Connection::ping() {
  auto resp = execute(0 /*Only check connection*/, "YIELD 1");
  if (resp.errorCode == ErrorCode::E_RPC_FAILURE || resp.errorCode == ErrorCode::E_DISCONNECTED) {

from nebula-console.

Shylock-Hg avatar Shylock-Hg commented on July 22, 2024

I know ping, But nebula-console will send ping when user send query not just when connecting.

from nebula-console.

jievince avatar jievince commented on July 22, 2024

But console just uses the nebula-go's interface session.execute, it doesn't use ping.

from nebula-console.

jievince avatar jievince commented on July 22, 2024

Which version of server do you use? I couldn't find this line GraphService.cpp:161] Execute query: in the code.

from nebula-console.

Shylock-Hg avatar Shylock-Hg commented on July 22, 2024

Which version of server do you use? I couldn't find this line GraphService.cpp:161] Execute query: in the code.

That's code I added to print the query, you could add too.

from nebula-console.

Related Issues (20)

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.