Giter Club home page Giter Club logo

Comments (6)

github-actions avatar github-actions commented on September 24, 2024

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

from openraft.

drmingdrmer avatar drmingdrmer commented on September 24, 2024

Thank you for reporting this issue in detail and proposing a fix.

What's the version of openraft were you using? I'll check if the issue has been resolved in the main branch.

With the latest main branch, if there is a pending action, drain_events will return immediately:

pub async fn drain_events(&mut self) -> Result<(), ReplicationClosed> {
tracing::debug!("drain_events");
// If there is next action to run, do not block waiting for events,
// instead, just try the best to drain all events.
if self.next_action.is_none() {
let event = self.rx_repl.recv().await.ok_or(ReplicationClosed {})?;
self.process_event(event);
}
self.try_drain_events().await?;

And RaftCore will periodically send an heartbeat event to ReplicationCore to wake up it thus self.rx_repl.recv() should not block for ever.

from openraft.

drmingdrmer avatar drmingdrmer commented on September 24, 2024

I was unable to reproduce the issue with a test case. Could you assist me in confirming that the steps in this test align with the steps in your situation:

And with export RUST_LOG=debug, the testing script will output debug level logs, which may help on tracing this issue.

from openraft.

pepinns avatar pepinns commented on September 24, 2024

I was on a previous version of main. I'll try again with this updated code and see if this resolves it. My version definitely doesn't have that if statement.

from openraft.

pepinns avatar pepinns commented on September 24, 2024

The updated main branch resolves this issue.

from openraft.

drmingdrmer avatar drmingdrmer commented on September 24, 2024

I was on a previous version of main. I'll try again with this updated code and see if this resolves it. My version definitely doesn't have that if statement.

Right. I found this bug and fixed it after pushing the backoff to github. :(

from openraft.

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.