Code Monkey home page Code Monkey logo

bookkeeper-tlaplus's People

Contributors

thetumbled avatar vanlightly avatar vitorenesduarte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bookkeeper-tlaplus's Issues

Different Implementation of ChangeEnsemble between BookKeeperProtocol and BookKeeperProtocolWithLimbo.

Hi, I have a question about the different Implementation of ChangeEnsemble between BookKeeperProtocol and BookKeeperProtocolWithLimbo.
The ChangeEnsemble operator in BookKeeperProtocolWithLimbo is defined as follows, which only select one faied bookie and add a seemingly unnecessary check ValidNextFragment.
I wonder whether it is a bug or a different implementation due to the new feature limbo? I will appreciate it if you could help to answer this question, thanks.

ChangeEnsemble(c, recovery) ==
    /\ NoPendingResends(c)
    /\ \/ recovery
       \/ ~recovery /\ c.meta_version = meta_version
    /\ \E bookie \in c.curr_fragment.ensemble :
        /\ WriteTimeoutForBookie(messages, bookie, recovery)
        /\ EnsembleAvailable(c.curr_fragment.ensemble \ {bookie}, {bookie})
        /\ ValidNextFragment(c.lac + 1)
        /\ LET new_ensemble   == SelectEnsemble(c.curr_fragment.ensemble \ {bookie}, {bookie})
               first_entry_id == c.lac + 1
           IN LET updated_fragments == UpdatedFragments(c, first_entry_id, new_ensemble)
              IN
                \* only update the metadata if not in ledger recovery
                /\ IF recovery 
                   THEN UNCHANGED << meta_version, meta_fragments >>
                   ELSE /\ meta_fragments' = updated_fragments
                        /\ meta_version' = meta_version + 1
                /\ clients' = [clients EXCEPT ![c.id] =  
                                    [c EXCEPT !.meta_version  = IF recovery THEN @ ELSE meta_version + 1,
                                              !.confirmed     = [id \in DOMAIN c.confirmed |->
                                                                   IF id >= first_entry_id
                                                                   THEN c.confirmed[id] \ {bookie}
                                                                   ELSE c.confirmed[id]],
                                              !.fragments     = updated_fragments,
                                              !.curr_fragment = Last(updated_fragments)]]
                /\ ClearWriteTimeout(bookie, recovery)

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.