lh2debug

Results 8 comments of lh2debug

Yes. For example, in the Raft protocol, there is one leader and two followers. The leader only needs to wait for the first follower to complete before returning.

Thank you for your suggestion. I will consider the above optimizations. @wwbmmm

Thank you for your answer. This approach of implementing reference counting internally within a Span seems impractical. Because reference Counting with void* rpcz_parent_span Fails Across Bthreads: Raw pointers in LocalStorage...

1. In LocalStorage, `rpcz_parent_span` maintains a `void*` type. The span layer provides functions to manage the `weak_ptr` pointer using `new`/`delete` and assign it to `rpcz_parent_span`. I've considered and tested this...

3. Based on our system performance tests, the implementation using smart pointers showed minimal performance impact.

4. To ensure compatibility with advanced clients who modify their protocols, using the `BRPC_ENABLE_SHARED_SPAN` macro to control the use of `Span*` or `std::weak_ptr` in the `ControllerPrivateAccessor` layer can resolve compilation...

> > Yes. For example, in the Raft protocol, there is one leader and two followers. The leader only needs to wait for the first follower to complete before returning....

@wwbmmm @yanglimingcn The code for bthread that doesn't depend on the brpc module (i.e., rpcz_parent_span remains void*) has been modified and tested. Please take a look, tkx~