Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 14:37

    lni on master

    rsm: some more cleanups for the… (compare)

  • Apr 04 12:00
    lni closed #99
  • Apr 04 12:00
    lni commented #99
  • Apr 04 11:56

    lni on master

    rsm: some cleanups for the rsm … (compare)

  • Apr 04 04:46
    lni closed #123
  • Apr 04 04:46
    lni commented #123
  • Apr 03 15:15
    Iulian7 opened #123
  • Mar 31 12:12

    lni on master

    docs: minor update for README.md (compare)

  • Mar 31 09:49

    lni on master

    docs: use pebble as the default… (compare)

  • Mar 29 07:21
    lni milestoned #122
  • Mar 29 07:21
    lni labeled #122
  • Mar 29 07:21
    lni assigned #122
  • Mar 29 07:21
    lni opened #122
  • Mar 17 04:55

    lni on master

    tests: minor fix. (compare)

  • Mar 17 04:50

    lni on master

    tests: removed the injected del… (compare)

  • Mar 15 15:09

    lni on master

    dragonboat: disabled LogDB type… (compare)

  • Mar 06 10:26

    lni on master

    logdb: removed LevelDB support (compare)

  • Mar 05 12:25

    lni on master

    dragonboat: bumped version to v… (compare)

  • Mar 05 12:24

    lni on release-3.2

    tests: minor tweak for a cpp bi… Merge branch 'master' into rele… (compare)

  • Mar 05 12:24

    lni on master

    tests: minor tweak for a cpp bi… (compare)

lni
@lni
@thesues for your described case, what is really needed is the ability to generate and deliver the snapshot on the fly. I am looking into that but I can't give any promise. also note that everything will be slow for the next couple of weeks because of the coming Spring Festival. thanks.
gensmusic
@gensmusic
@lni just read the chat history. I think I'm facing the same promblem with shijiayun, my statechine beckend is disk-based file. generate a sanpshot cause a copy or part of copy.
@lni also, is there a way to know which raft node is inactive ?
lni
@lni
@gensmusic you can just maintain a timestamp in your own state machine type to keep recording when it is last updated/accessed, this timestamp can be queried whenever you want.
Samuel Marks
@SamuelMarks
hi
@0zAND1z @lni Are you interested in helping out with a new open-source consensus algorithm? - Can pay! - Especially interested in formal verification of it.
lni
@lni
@SamuelMarks I've replied to your email. cheers.
qicosmos
@qicosmos
Hi @lni , do you have a plan to develop a c++ version of dragonboat?
qicosmos
@qicosmos
@lni Actually, i'm developing a modern c++ raft library, however i'm not familiar with raft protocol and details, so wish you could do some help
lni
@lni
hi @qicosmos based on my experience when developing dragonboat, expert level knowledge on consensus/raft is a must if you want to build a production quality raft library. it is also quite time consuming - one can probably implement a toy raft implementation in a couple of days, but making it production ready with good performance & complete test coverage takes ages. hope these info can be useful for your adventure. good luck.
lni
@lni
@qicosmos dragonboat already has C++ binding support so it can be used in C++ projects. Instead of starting a brand new C++ implementation and going through all those brutal distributed system bugs again on your own, if you are interested, we can probably work together to make dragonboat's C++ binding more useful to different C++ projects.
qicosmos
@qicosmos
But all the code are go not c++, i need a c++ implementation
binding meas just make a c++ wrapper for go interface, right?
maybe we could work together for the c++ implementation, you have already implemented a go raft version, so you know what the problems, and it's easy to implement the c++ raft
Riaan Jacobs
@riaan53
Hi @qicosmos , it should work as is for a c++ project, have a look at https://github.com/lni/dragonboat-example/tree/master/cpphelloworld (i havnt used it yet, im using pure go)
Riaan Jacobs
@riaan53
Hi @lni can you make proposals and/or reads from a nodehost that does not have the raft group on it? ie does dragonboat re-route the request or is it up to the implementer?
lni
@lni
@riaan53 No you can't and dragonboat won't re-route such request.
Riaan Jacobs
@riaan53
ok cool, planned to do my own routing just want to make sure thx
when using the IConcurrentStateMachine the update method returns a slice, how does that map to the syncPropose single result code?
Riaan Jacobs
@riaan53
figured it out - i was to tired last night :) the batches provided to IConcurrentStateMachine update is mapped by dragonboat and provides the correct result to the syncPropose
Riaan Jacobs
@riaan53
@lni why doest the IOnDiskStateMachine support sessions? "IOnDiskStateMachine based nodes must use NoOPSession"
lni
@lni
@riaan53 I've addressed your question in #60
Riaan Jacobs
@riaan53
@lni for the disk sm, is the design to fsync after each batch? Seeing as it was already fsynced in raft wal it feels a bit unnecessary to incur the penalty twice. My thinking is that on a crash or restart, recover all items from disk with valid crc and then report that to the open method (like it is now) - the missing items will be replayed as necessary.
lni
@lni
@riaan53 that is a very good question, I think other users might be interested in that as well, so I addressed it in #62. thanks.
Praying
@Praying
@lni Hi, Why here need initial and newNode , is them same meaning?
// LaunchPeer starts or restarts a Raft node.
func LaunchPeer(config *config.Config, logdb ILogDB,
    addresses []PeerAddress, initial bool, newNode bool) (*Peer, error)
initial doesn't mean newNode?
kzl
@kangzhanlei
func (r *raft) handleReplicateMessage(m pb.Message) {
    ...
    if r.log.matchTerm(m.LogIndex, m.LogTerm) {
        r.log.tryAppend(m.LogIndex, m.Entries)
        lastIdx := m.LogIndex + uint64(len(m.Entries))
        r.log.commitTo(min(lastIdx, m.Commit))
        resp.LogIndex = lastIdx
    } else {
              …
    }
}
tryAppend will check the conflictIndex , and shrink m.Entires to append , but the lastIdx grows totally, is that correct?
lni
@lni
@kangzhanlei lastIndex is the index of the last entry in MsgReplicate from the leader. If you read tryAppend's implementation and the raft paper, an entry with index=lastIndex will always exist in follower's log when tryAppend returns, this has nothing to do with shrinking. shrinking happens in the above tryAppend() and inmem.merge() to just make sure that we don't overwrite an existing entry using a new one with matched index/term.
kzl
@kangzhanlei
@lni , i see , thanks
xkeyideal
@xkeyideal
@lni Please see the issue #98 , how to handle appliedIndex > ents[last].Index without panic? I compact the entries, but ondisk need return entries, the compact will be some errors
lni
@lni
@xkeyideal I don't understand what you actually want to achieve here. could you please open a new issue and provide details on what is the goal, what is the procedure to reproduce the panic you mentioned.
wclssdn
@wclssdn
On the Windows there miss two files:github.com\lni\dragonboat\v3@v3.1.0\internal\utils\fileutil\flock_winapi.go flock_windows.go . I copy these files from github.com\lni\goutils@v1.0.3\fileutil\flock_winapi.go flock_windows.go . It works.
Avinash Upadhyayula
@UAvinash7
Hi @lni
I was exploring dragonboat multigroup libraries set and came across an interesting question which is: I've a leader node and 4 follower nodes where leader is proposing a transaction as valid (i.e. true) where as follower node F1 also proposing the transaction as valid, but follower nodes F3 and F4 are proposing the transaction as invalid (i.e. false) and during the same time the follower node F2 goes offline (the reason can be anything, either malicious behavior or due to some hardware/power issue). So, in this case, what is the fate of the proposed transaction i.e. whether it will be accepted and appended to the ledger or it will get rejected as the voting ratio is 50:50 and also suggest how this situation can be overcomed.
Hoping for a reply
Thanks in advance!
Anish Bhusal
@anisbhsl
Hi, new user of dragonboat here. I am experimenting with dragonboat for a while now. It's an amazing library. But I wanted to use custom LogDB other than current impelementations in LevelDB/RocksDB. NodeHostConfig seems to provide a LogDBFactory option to state our custom factory method for LogDB. But I haven't been successful so far. I am trying to use BaderDB v2.x as LogDB. Has anyone tried this before? I would be thankful if someone can provide example of how this can be done. Thank You!
implementations**
jkassismz
@jkassismz
happy holidays!!! i'm curious why multiple active rafts degrades performance. the docs say this reduces batching, but i would think that multiple rafts would reduce blocking as there are now multiple queues?
lni
@lni
@anisbhsl you need to implement your own raftio.ILogDB and provide a factory method that returns an instance of your raftio.ILogDB. internal/logdb/sharded_rdb.go contains the default ILogDB implementation used by dragonboat. note that the default one uses multiple shards, it also supports rocksdb/leveldb/pebble, you don't have to do any of these in your custom LogDB.
@jkassismz large number of active raft nodes degrades performance, if you have say 32-128 active nodes, you shouldn't see too much degraded performance.
Mandeep Khatry
@mandeepkhatry
@lni What I understood after going through dragonboat library is that one need to implement custom db through IKVStore. Functions such as IterateValue, GetValue etc are specific to particular db. So one need to implement custom factory method in plugins and custom IKVStore in logdb/kv. ILogDB implementations seems to be general and not specific. Am I right?
Mandeep Khatry
@mandeepkhatry
@lni Currently what I have done is I have implemented my own badgerdb factory method inside plugins folder and I have also implemented IKVStore for badger inside internal/logdb/kv just like the ones implemented in leveldb, pebbeldb and rocksdb in the same folder. Isn't that sufficient to make sure that the badgerdb implementation for logdb is correctly implemented because every other go programs including sharded_rdb.go uses the IKVStore functions such as GetWriteBatch, CommitWriteBatch etc. Isn't IKVStore interface the only required interface for implementing other db as logdb because it's the only interface that is specific to each dbs?
lni
@lni
@mandeepkhatry as mentioned above, users need to implement raftio.ILogDB to build a custom LogDB implementation. please have a look at issue #61 for reasons why IKVStore is not the answer.
jkassismz
@jkassismz
@lni i'm still a little confused... i would expect more nodes to increase network traffic, but what about multiple rafts on the same nodes? this gives multiple parallel channels, yes?
lni
@lni
more raft instances on the same node (machine) leads to more traffic, it is also more difficult to batch such traffic/operations, as a result, the total throughput will decrease.
Nob
@nobsu
How many raft groups are supported?10000?
有没有中文交流渠道?qq?
@lni
mmh
@myrfy001
@lni hi, I want to know that is it safe to allow an observer being removed from the cluster and join again? I want to use dragonboat as a data sync middleware in a dynamic cluster, that is, I will setup a 3-nodes cluster as a stable datacenter, and other nodes run as observers in k8s pods which only read the newest data from the datacenter. In this case, the adress of the pods maybe changing without control, a new observer node in pod may get address of an previous dead node.
lni
@lni
@nobsu there is no hard limit on the number of supported raft groups. what kind of performance you can get when having 100k groups is a different story.
@myrfy001 once a node (observer or not) is removed, it is not allowed to re-join the raft group using the same nodeID. that being said, it is ok to add another observer with a different nodeid.