lni / dragonboat-example Goto Github PK
View Code? Open in Web Editor NEWExamples for Dragonboat
License: Apache License 2.0
Examples for Dragonboat
License: Apache License 2.0
I run this example on win64 , it works perfectly, replicaid 1 is the leader's id, when i kill the leader ,the replicaid 2 follower become the leader, but it still trys to connect the old leader.
Did i make a mistake?
Here is the log:
2023-01-10 15:03:02.889397 W | transport: breaker localhost:63003 to localhost:63001 failed, connect and process failed: dial tcp [::1]:63001: connectex: No connection could be made because the target machine actively refused it.
2023-01-10 15:03:02.889914 W | transport: localhost:63001 became unreachable, affected 0 nodes
count: 0
leader: 3
2023-01-10 15:03:05.875659 E | transport: Nodehost localhost:63003 failed to get a connection to localhost:63001, dial tcp [::1]:63001: connectex: No connection could be made because the target machine actively refused it.
2023-01-10 15:03:05.875659 W | transport: breaker localhost:63003 to localhost:63001 failed, connect and process failed: dial tcp [::1]:63001: connectex: No connection could be made because the target machine actively refused it.
2023-01-10 15:03:05.875659 W | transport: localhost:63001 became unreachable, affected 0 nodes
Hi, Why update function need return sm.Result . what is the purpose for this design ? Is sm.Result will use in my own program logic ? I am confuse about the Result.Value and Result.Data .
In helloworld example sm.Result.Value = uint64(len(data)) , Why this value is uint64(len(data)) ?
func (s *ExampleStateMachine) Update(data []byte) (sm.Result, error) {
// in this example, we print out the following hello world message for each
// incoming update request. we also increase the counter by one to remember
// how many updates we have applied
s.Count++
fmt.Printf("from ExampleStateMachine.Update(), msg: %s, count:%d\n",
string(data), s.Count)
return sm.Result{Value: uint64(len(data))}, nil
}
i've tried running the ondisk replica id 3 on another new directory and it doesnt work
when ran again on a new folder, the error appears.
2024-03-30 14:17:23.563027 I | dragonboat: LogDB info received, shard 14, busy false
2024-03-30 14:17:23.569342 I | logdb: using plain logdb
2024-03-30 14:17:23.569446 I | dragonboat: LogDB info received, shard 15, busy false
2024-03-30 14:17:23.570693 I | dragonboat: logdb memory limit: 8192 MBytes
2024-03-30 14:17:23.571517 I | dragonboat: NodeHost ID: f4c83988-8282-4f78-ac09-8b9fddfb3614
2024-03-30 14:17:23.571525 I | dragonboat: using regular node registry
2024-03-30 14:17:23.571529 I | dragonboat: filesystem error injection mode enabled: false
2024-03-30 14:17:23.573204 I | dragonboat: transport type: go-tcp-transport
2024-03-30 14:17:23.573214 I | dragonboat: logdb type: sharded-pebble
2024-03-30 14:17:23.573218 I | dragonboat: nodehost address: localhost:63003
2024-03-30 14:17:23.576440 I | dragonboat: [00128:00003] replaying raft logs
Usage -
put key value
get key
2024-03-30 14:17:23.584012 I | dragonboat: [00128:00003] initialized using <00128:00003:0>
2024-03-30 14:17:23.584028 I | dragonboat: [00128:00003] initial index set to 0
2024-03-30 14:17:24.607819 C | raft: invalid commitTo index 6, lastIndex() 3
panic: invalid commitTo index 6, lastIndex() 3
goroutine 513 [running]:
github.com/lni/goutils/logutil/capnslog.(*PackageLogger).Panicf(0xc0000136e0, {0xb75303?, 0x778826b11108?}, {0xc0002ba1a0?, 0xc00019cfb0?, 0xc000973a38?})
/root/go/pkg/mod/github.com/lni/[email protected]/logutil/capnslog/pkg_logger.go:88 +0xb5
github.com/lni/dragonboat/v4/logger.(*capnsLog).Panicf(0xc00019cf90?, {0xb75303?, 0x411005?}, {0xc0002ba1a0?, 0xa7a8e0?, 0xa73a01?})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/logger/capnslogger.go:74 +0x25
github.com/lni/dragonboat/v4/logger.(*dragonboatLogger).Panicf(0x8?, {0xb75303, 0x29}, {0xc0002ba1a0, 0x2, 0x2})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/logger/logger.go:135 +0x51
github.com/lni/dragonboat/v4/internal/raft.(*entryLog).commitTo(0xc0003ad420, 0x6)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/logentry.go:341 +0xf3
github.com/lni/dragonboat/v4/internal/raft.(*raft).handleHeartbeatMessage(_, {0x11, 0x3, 0x2, 0x80, 0x6, 0x0, 0x0, 0x6, 0x0, ...})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/raft.go:1398 +0x3c
github.com/lni/dragonboat/v4/internal/raft.(*raft).handleFollowerHeartbeat(_, {0x11, 0x3, 0x2, 0x80, 0x6, 0x0, 0x0, 0x6, 0x0, ...})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/raft.go:2134 +0x65
github.com/lni/dragonboat/v4/internal/raft.defaultHandle(_, {0x11, 0x3, 0x2, 0x80, 0x6, 0x0, 0x0, 0x6, 0x0, ...})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/raft.go:2332 +0x75
github.com/lni/dragonboat/v4/internal/raft.(*raft).Handle(_, {0x11, 0x3, 0x2, 0x80, 0x6, 0x0, 0x0, 0x6, 0x0, ...})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/raft.go:1601 +0x102
github.com/lni/dragonboat/v4/internal/raft.(*Peer).Handle(_, {0x11, 0x3, 0x2, 0x80, 0x6, 0x0, 0x0, 0x6, 0x0, ...})
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/raft/peer.go:192 +0x185
github.com/lni/dragonboat/v4.(*node).handleReceivedMessages(0xc0001b0008)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/node.go:1364 +0x19b
github.com/lni/dragonboat/v4.(*node).handleEvents(0xc0001b0008)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/node.go:1178 +0xaf
github.com/lni/dragonboat/v4.(*node).stepNode(_)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/node.go:1144 +0x145
github.com/lni/dragonboat/v4.(*engine).processSteps(0xc000142a00, 0x1, 0xc000975de0?, 0xc000210090, {0x10a6480, 0x1?, 0x0}, 0xc0004c70e0?)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:1320 +0x25d
github.com/lni/dragonboat/v4.(*engine).stepWorkerMain(0xc000142a00, 0x1)
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:1254 +0x3c6
github.com/lni/dragonboat/v4.newExecEngine.func1()
/root/go/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:1047 +0x5d
github.com/lni/goutils/syncutil.(*Stopper).runWorker.func1()
/root/go/pkg/mod/github.com/lni/[email protected]/syncutil/stopper.go:79 +0x123
created by github.com/lni/goutils/syncutil.(*Stopper).runWorker in goroutine 1
/root/go/pkg/mod/github.com/lni/[email protected]/syncutil/stopper.go:74 +0xc6
$ ./example-helloworld -nodeid 4 -addr localhost:63100 -join
returns the following:
node address: localhost:63100
2019-01-13 20:54:40.542160 I | dragonboat: go version: go1.11
2019-01-13 20:54:40.542293 I | dragonboat: dragonboat version: 2.0.0, raftlog type: three-stage, logdb type: fully-batched rocksdb
2019-01-13 20:54:40.542301 I | dragonboat: raft entry encoding scheme: colfer
2019-01-13 20:54:40.542306 W | dragonboat: Running on darwin, don't use darwin for production purposes
2019-01-13 20:54:40.544187 I | dragonboat: no master server specified, running in standalone mode
2019-01-13 20:54:40.544212 W | dragonboat: DeploymentID not set in NodeHostConfig
2019-01-13 20:54:40.544221 I | dragonboat: DeploymentID set to 1
2019-01-13 20:54:40.545033 I | logdb: RangeDelete is disabled in ShardedRDB
2019-01-13 20:54:40.622860 I | dragonboat: logdb type name: rocksdb-logdb
2019-01-13 20:54:40.622881 I | dragonboat: standalone mode, nh.initialize() directly invoked
2019-01-13 20:54:40.850911 I | dragonboat: region is set to UNKNOWN on localhost:63100
2019-01-13 20:54:40.850953 I | dragonboat: transport type: go-tcp-transport
2019-01-13 20:54:40.850960 I | dragonboat: logdb type: rocksdb-logdb
2019-01-13 20:54:40.850965 I | dragonboat: nodehost address: localhost:63100
2019-01-13 20:54:40.851039 I | dragonboat: startCluster called for [00128:00004], join true, nodes map[4:localhost:63100 1:localhost:63001 2:localhost:63002 3:localhost:63003]
2019-01-13 20:54:40.851050 E | dragonboat: trying to join [00128:00004] with initial member list map[1:localhost:63001 2:localhost:63002 3:localhost:63003 4:localhost:63100]
failed to add cluster, cluster settings are invalid
make
编译会出错
[root@kele dragonboat-example]# make
CGO_LDFLAGS="-lrocksdb" go build -v -o example-helloworld github.com/lni/dragonboat-example/v3/helloworld
github.com/lni/dragonboat/v3/internal/logdb/kv/rocksdb/gorocksdb
# github.com/lni/dragonboat/v3/internal/logdb/kv/rocksdb/gorocksdb
//usr/local/lib/librocksdb.so: undefined reference to `dlopen'
//usr/local/lib/librocksdb.so: undefined reference to `dlclose'
//usr/local/lib/librocksdb.so: undefined reference to `dlerror'
//usr/local/lib/librocksdb.so: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make: *** [Makefile:53: helloworld] Error 2
参考 bmeg/grip#208
最新版的rocksdb,编译的时候需要链接 -ldl
(rocksdb 的问题)
可能需要更新一下 Makefile 里面的 CDEPS_LDFLAGS
,以及各个目录下面 README.md 的编译命令
../github.com/lni/dragonboat/internal/logdb/gorocksdb/backup.go:5:10: fatal error: 'rocksdb/c.h' file not found
#include "rocksdb/c.h"
^~~~~~~~~~~~~
1 error generated.
Is the distribution of multi groups leaders balanced? Or other mechanisms? For example, I have 1000 groups and 3 nodes. What is the distribution of leaders?
how to use tcp or etcd svr to read ,to replace "reader := bufio.NewReader(os.Stdin)" in example . or are there other client example to send Propose to example server ,thanks
goroutine 186 [running]:
encoding/binary.littleEndian.Uint64(...)
/data/open_source/go/src/encoding/binary/binary.go:77
main.(*DiskKV).queryAppliedIndex(0xc0004d9920, 0xc000306400, 0x0, 0x0, 0x0)
/data/go_workspace/src/github.com/lni/dragonboat-example/ondisk/diskkv.go:308 +0x398
main.(*DiskKV).Open(0xc0004d9920, 0xc0005b6000, 0x0, 0x0, 0xc0007a2900)
/data/go_workspace/src/github.com/lni/dragonboat-example/ondisk/diskkv.go:347 +0x19d
github.com/lni/dragonboat/v3/internal/rsm.(*OnDiskStateMachine).Open(0xc00011e700, 0xc0005b6000, 0xc00011e700, 0xf25ca0, 0x1635ba0)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/rsm/adapter.go:285 +0x4b
github.com/lni/dragonboat/v3/internal/rsm.(*NativeSM).Open(0xc0001ea0d0, 0x7f5b9a577e98, 0xc0001e2800, 0xc0007a2970)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/rsm/managed.go:131 +0x42
github.com/lni/dragonboat/v3/internal/rsm.(*StateMachine).OpenOnDiskStateMachine(0xc00007e000, 0x0, 0x0, 0x0)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/internal/rsm/statemachine.go:413 +0xc2
github.com/lni/dragonboat/v3.(*node).recover(0xc0002d8000, 0x0, 0x0, 0x0, 0x101, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/node.go:784 +0xf2a
github.com/lni/dragonboat/v3.(*ssWorker).recover(0xc00000eaa0, 0x0, 0x0, 0x0, 0x101, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:288 +0x78
github.com/lni/dragonboat/v3.(*ssWorker).handle(0xc00000eaa0, 0x0, 0x0, 0x0, 0x101, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:277 +0x138
github.com/lni/dragonboat/v3.(*ssWorker).workerMain(0xc00000eaa0)
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:265 +0x78
github.com/lni/dragonboat/v3.newSSWorker.func1()
/data/go_workspace/pkg/mod/github.com/lni/dragonboat/[email protected]/engine.go:251 +0x2a
github.com/lni/goutils/syncutil.(*Stopper).runWorker.func1(0xc00000e9e0, 0xc0003104b0, 0x0, 0x0, 0xc0001e3400)
/data/go_workspace/pkg/mod/github.com/lni/[email protected]/syncutil/stopper.go:79 +0x3a
created by github.com/lni/goutils/syncutil.(*Stopper).runWorker
/data/go_workspace/pkg/mod/github.com/lni/[email protected]/syncutil/stopper.go:74 +0x98
There is some problem in here
func (d *DiskKV) Update(ents []sm.Entry) ([]sm.Entry, error) {
...
idx := fmt.Sprintf("%d", ents[len(ents)-1].Index)
wb.Set([]byte(appliedIndexKey), []byte(idx), db.wo)
...
}
change to these
func (d *DiskKV) Update(ents []sm.Entry) ([]sm.Entry, error) {
...
bidx := make([]byte, 8)
binary.LittleEndian.PutUint64(bidx, ents[len(ents)-1].Index)
wb.Set([]byte(appliedIndexKey), bidx, db.wo)
...
}
possible to do a pub/sub example?
I've gone through this and so far so good.
However, there is a reference to an example using something other than the no-op client session, but I can't seem to find it:
Apologies in advance if I'm completely missing it. Honest, I've looked.
trying to read godoc for diskkv.go but not available. possible to pls update?
https://pkg.go.dev/github.com/lni/dragonboat-example#section-readme
when I run "./example-ondisk -replicaid 1" , it remains: "raftpb: recorded sm type RegularStateMachine, got OnDiskStateMachine" and fail, can you help me to fix this?
did go mod init ondisk
go mod tidy
go mod vendor but when i did go build again i get the following error.
i'm not used to this error. possible to "fix" the ondisk example?
yes i know go build . without all the go mod stuff is working but i prefer having to work with go mod vendor
pls update the code. thx
go build .
# github.com/lni/dragonboat/v4/internal/vfs
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:54:17: cannot use (*PebbleFS)(nil) (value of type *PebbleFS) as "github.com/cockroachdb/pebble/vfs".FS value in variable declaration: *PebbleFS does not implement "github.com/cockroachdb/pebble/vfs".FS (missing method OpenReadWrite)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:58:9: cannot use &PebbleFS{…} (value of type *PebbleFS) as "github.com/cockroachdb/pebble/vfs".FS value in return statement: *PebbleFS does not implement "github.com/cockroachdb/pebble/vfs".FS (missing method OpenReadWrite)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:73:9: cannot use p.fs.Create(name) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:88:13: cannot use f (variable of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in argument to opt.Apply: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:90:9: cannot use f (variable of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:95:9: cannot use p.fs.OpenDir(name) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
vendor/github.com/lni/dragonboat/v4/internal/vfs/vfs.go:115:9: cannot use p.fs.ReuseForWrite(oldname, newname) (value of type "github.com/lni/vfs".File) as "github.com/cockroachdb/pebble/vfs".File value in return statement: "github.com/lni/vfs".File does not implement "github.com/cockroachdb/pebble/vfs".File (missing method Fd)
Try the hello world demo got error information below
[root@localhost dragonboat-example]# CGO_LDFLAGS="-L/usr/local/lib -lrocksdb" go build -v -o example-helloworld github.com/lni/dragonboat-example/helloworld
[root@localhost dragonboat-example]# ./example-helloworld -nodeid 1
node address: localhost:63001
2019-01-18 08:56:15.525426 I | dragonboat: go version: go1.11
2019-01-18 08:56:15.526223 I | dragonboat: dragonboat version: 2.0.0, raftlog type: three-stage, logdb type: fully-batched rocksdb
2019-01-18 08:56:15.526235 I | dragonboat: raft entry encoding scheme: colfer
2019-01-18 08:56:15.530460 I | dragonboat: no master server specified, running in standalone mode
2019-01-18 08:56:15.530540 W | dragonboat: DeploymentID not set in NodeHostConfig
2019-01-18 08:56:15.530553 I | dragonboat: DeploymentID set to 1
2019-01-18 08:56:15.535114 I | logdb: RangeDelete is disabled in ShardedRDB
2019-01-18 08:56:15.538846 E | logdb: direct io failed: open example-data/helloworld-data/node1/localhost.localdomain/00000000000000000001/logdb-0/.direct_io_test_safe_to_delete.dragonboat: invalid argument
2019-01-18 08:56:15.541918 E | logdb: direct io failed: open example-data/helloworld-data/node1/localhost.localdomain/00000000000000000001/logdb-0/.direct_io_test_safe_to_delete.dragonboat: invalid argument
panic: IO error: While fsync: a directory: Invalid argument
goroutine 1 [running]:
github.com/lni/dragonboat.(*NodeHost).createLogDB(0xc000120000, 0x0, 0xc000018330, 0x22, 0xc000018330, 0x22, 0xc8, 0x8bfba3, 0xf, 0x0, ...)
/home/wwwroot/goroot/src/github.com/lni/dragonboat/nodehost.go:1112 +0x284
github.com/lni/dragonboat.NewNodeHostWithMasterClientFactory(0x0, 0xc000018330, 0x22, 0xc000018330, 0x22, 0xc8, 0x8bfba3, 0xf, 0x0, 0x0, ...)
/home/wwwroot/goroot/src/github.com/lni/dragonboat/nodehost.go:225 +0xc78
github.com/lni/dragonboat.NewNodeHost(0x0, 0xc000018330, 0x22, 0xc000018330, 0x22, 0xc8, 0x8bfba3, 0xf, 0x0, 0x0, ...)
/home/wwwroot/goroot/src/github.com/lni/dragonboat/nodehost.go:182 +0x5a
main.main()
/home/wwwroot/goroot/src/github.com/lni/dragonboat-example/helloworld/main.go:185 +0x56c
I re-implemented some C++ examples according to the Go examples. Those who are interested in C++ binding can refer to these examples
Is it even possible? Idea is that you could have chunks of data spread across different raft groups and using OnDiskCluster to persist / recover snapshots? The idea is to get more throughput since the SyncPropose/Reads will be offloaded to different Raft leaders, escaping the bottleneck of a single leader for all data in the cluster.
Also, this is by far the best Raft implementation in Golang, super easy to use, great performance.
@lni i will add a simple example as a simple etcd replacement and expand on the on-disk example with code pasted here.
can u pls help elaborate a few things:
is there a particular reason you put 128 as example shard id?
https://github.com/lni/dragonboat-example/blob/master/ondisk/main.go
with reference to lni/dragonboat#278 and example ondisk, i dont understand why shard 0 to 15 is being used when the specified shard id is 128? why would dragonboat have anything to do with shard 0 - 15 when no such information is specified with the ondisk example?
# ./ondisk
node address: localhost:63001
2023-05-28 13:25:42.511773 I | dragonboat: go version: go1.20.2, linux/amd64
2023-05-28 13:25:42.511954 I | dragonboat: dragonboat version: 4.0.0 (Dev)
2023-05-28 13:25:42.511972 W | config: mutual TLS disabled, communication is insecure
2023-05-28 13:25:42.512071 I | config: using default EngineConfig
2023-05-28 13:25:42.512119 I | config: using default LogDBConfig
2023-05-28 13:25:42.512198 I | dragonboat: DeploymentID set to 1
2023-05-28 13:25:44.233738 I | dragonboat: LogDB info received, shard 0, busy false
2023-05-28 13:25:44.356410 I | dragonboat: LogDB info received, shard 1, busy false
2023-05-28 13:25:44.425484 I | dragonboat: LogDB info received, shard 2, busy false
2023-05-28 13:25:44.473878 I | dragonboat: LogDB info received, shard 3, busy false
2023-05-28 13:25:44.730367 I | dragonboat: LogDB info received, shard 4, busy false
2023-05-28 13:25:44.774752 I | dragonboat: LogDB info received, shard 5, busy false
2023-05-28 13:25:44.808452 I | dragonboat: LogDB info received, shard 6, busy false
2023-05-28 13:25:44.827859 I | dragonboat: LogDB info received, shard 7, busy false
2023-05-28 13:25:44.847247 I | dragonboat: LogDB info received, shard 8, busy false
2023-05-28 13:25:44.866856 I | dragonboat: LogDB info received, shard 9, busy false
2023-05-28 13:25:44.886332 I | dragonboat: LogDB info received, shard 10, busy false
2023-05-28 13:25:44.905451 I | dragonboat: LogDB info received, shard 11, busy false
2023-05-28 13:25:44.925209 I | dragonboat: LogDB info received, shard 12, busy false
2023-05-28 13:25:44.944911 I | dragonboat: LogDB info received, shard 13, busy false
2023-05-28 13:25:44.965035 I | dragonboat: LogDB info received, shard 14, busy false
2023-05-28 13:25:44.984333 I | dragonboat: LogDB info received, shard 15, busy false
2023-05-28 13:25:44.984406 I | logdb: using plain logdb
2023-05-28 13:25:44.988192 I | dragonboat: logdb memory limit: 8192 MBytes
2023-05-28 13:25:44.991570 I | dragonboat: NodeHost ID: 2d4e1f7a-d025-4198-9080-5b900f56c17e
2023-05-28 13:25:44.992000 I | dragonboat: using regular node registry
2023-05-28 13:25:44.992013 I | dragonboat: filesystem error injection mode enabled: false
2023-05-28 13:25:44.996582 I | dragonboat: transport type: go-tcp-transport
2023-05-28 13:25:44.996611 I | dragonboat: logdb type: sharded-pebble
2023-05-28 13:25:44.996621 I | dragonboat: nodehost address: localhost:63001
2023-05-28 13:25:45.005053 I | dragonboat: [00128:00001] replaying raft logs
Usage -
put key value
get key
2023-05-28 13:25:45.032584 I | dragonboat: [00128:00001] initialized using <00128:00001:0>
2023-05-28 13:25:45.032688 I | dragonboat: [00128:00001] initial index set to 0
../dragonboat/internal/logdb/gorocksdb/cache.go:28:13: could not determine kind of name for C.rocksdb_cache_get_pinned_usage
../dragonboat/internal/logdb/gorocksdb/cache.go:23:13: could not determine kind of name for C.rocksdb_cache_get_usage
had the errors above when building with version 4.1
@lni
regarding multiple raft group
what does it mean?
i've seen the code but it seems there are two groups that use the same localhost ports.
i understand how raft works but when it comes to updates, how does it work when consistencies between two groups work?
for multiple raft group example, why do u make it into 1 server instead of 2? can u do that in 2 server example? because i expect each raft group to at least be in their own server instance for testing purposes.
Can replicas run on different hosts to form a cluster? When I tried to do this, configuring the node address, I used the public ip of the host, and the ip was not recognized at startup.
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.