vanlightly / bookkeeper-tlaplus Goto Github PK
View Code? Open in Web Editor NEWA TLA+ specification of the Apache BookKeeper replication protocol
License: MIT License
A TLA+ specification of the Apache BookKeeper replication protocol
License: MIT License
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.