Code Monkey home page Code Monkey logo

Comments (5)

pmoosman avatar pmoosman commented on June 9, 2024

Looking at the code, I think the problem is the zero value for next_ping duration. In posix_engine.cc there is function called RunAfterInternal(). If the when duration is less than or equal to zero, the call back is run immediately and an invalid handle is returned. (Code which was added by AJ Heller 08-16-2023).

Perhaps a simple solution would be to ensure the duration is never zero.

Perhaps in finish_bdp_ping_locked() the following code could be added:

      #define MIN_PING_TIME 5 // ms

      t->event_engine->RunAfter(std::max(next_ping - grpc_core::Timestamp::Now(),
                                         grpc_core::Duration::Milliseconds(MIN_PING_TIME)), [t] {

from grpc.

drfloob avatar drfloob commented on June 9, 2024

I think we can just remove the assert, it's wrong. In the case where a RunAfter is immediate, the handle will be invalid since the callback will not be cancellable.

from grpc.

drfloob avatar drfloob commented on June 9, 2024

This should be fixed in #35953. If you'd like to test against the master branch, a nightly build should have this change tomorrow https://packages.grpc.io/

from grpc.

pmoosman avatar pmoosman commented on June 9, 2024

Thanks!

from grpc.

drfloob avatar drfloob commented on June 9, 2024

@pmoosman are you using the bigquery client library, or are you making gRPC calls directly?

from grpc.

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.