Giter Club home page Giter Club logo

Comments (9)

YangKian avatar YangKian commented on May 24, 2024 2

/assignme

from openraft.

YangKian avatar YangKian commented on May 24, 2024 1

get~ thanks XD

from openraft.

github-actions avatar github-actions commented on May 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.

YangKian avatar YangKian commented on May 24, 2024

Hi, I have a question, the old last_id_in_log method will return a LogId,not an Option<LogId>, but the new one we should return an Option. I found I need to call unwrap_or_default() every time I want to get the last_log_id. Shall we replace the return type of get_log_state method to Result<(Option<LogId>, LogId), StorageError> ? @drmingdrmer

from openraft.

drmingdrmer avatar drmingdrmer commented on May 24, 2024

There are some corner cases with using LogId for last_log_id.
E.g., when there is no log at all, using LogId, it returns (0,0), which will confuse the caller.

  • unwrap() everywhere, for now, is not a big deal. As soon as the main branch merges #49 , it will work smoothly altogether.

from openraft.

Veeupup avatar Veeupup commented on May 24, 2024

@YangKian hi, this issue may have a strong connection with #49 , it seems difficult to finish each one alone, so do you want to combine these two issues into one pr to fix them or any other advice?

from openraft.

YangKian avatar YangKian commented on May 24, 2024

@Veeupup Sorry for the late reply. Is it blocking something on your side? It seems to be working fine on my side, at least the tests passed after the changes were made, if I'm not missing something. I'll fill the pr later, and if my side is blocking your progress, it's ok to leave it to me XD

from openraft.

Veeupup avatar Veeupup commented on May 24, 2024

@YangKian yeah, u can finish it later. from my side, it will make nonsense if last_id_in_log() and some function return LogId ranther than Option<LogId>.

from openraft.

YangKian avatar YangKian commented on May 24, 2024

@Veeupup Ok, let me handle it~

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.