Closed erwadba closed 2 weeks ago
server_api中pause的作用是暂停同步么? 我这边测试pause。起不到暂定同步的作用。打印了一些日志,又开始继续同步任务
# curl -XPOST 'http://192.168.10.181:18001/syncer/pause?inputs=all&flushdb=yes' 这个是日志: 2024-10-11 15:12:32 info syncer/output.go:254 [RedisOutput(192.168.10.184:7001)] stats : filterCmd(0), sendCmd(22) 2024-10-11 15:12:32 info syncer/output.go:254 [RedisOutput(192.168.10.185:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:32 info syncer/output.go:254 [RedisOutput(192.168.10.183:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:32 info syncer/output.go:254 [RedisOutput(192.168.10.181:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:37 info syncer/output.go:254 [RedisOutput(192.168.10.184:7001)] stats : filterCmd(0), sendCmd(22) 2024-10-11 15:12:37 info syncer/output.go:254 [RedisOutput(192.168.10.185:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:37 info syncer/output.go:254 [RedisOutput(192.168.10.183:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:37 info syncer/output.go:254 [RedisOutput(192.168.10.181:7001)] stats : filterCmd(0), sendCmd(2) 2024-10-11 15:12:39 info syncer/output.go:285 [RedisOutput(192.168.10.184:7001)] send aof done : runId(0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9), offset(2793434284), size(-1) 2024-10-11 15:12:39 info syncer/output.go:673 [RedisOutput(192.168.10.184:7001)] command parser is stopped 2024-10-11 15:12:39 error syncer/replica.go:217 [ReplicaLeader(192.168.10.184:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 warn syncer/replica.go:77 [ReplicaLeader(192.168.10.184:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 error cmd/syncer_api.go:137 [SyncerCommand] Sync error : addr(192.168.10.184:7001), err(err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose])) 2024-10-11 15:12:39 info cmd/syncer.go:574 [SyncerCommand] syncer is stopped : <nil> 2024-10-11 15:12:39 info syncer/output.go:285 [RedisOutput(192.168.10.185:7001)] send aof done : runId(58e4e08d823b6c89b3c27e95a03ae67dcde591fd), offset(2532437988), size(-1) 2024-10-11 15:12:39 info cmd/syncer.go:592 [SyncerCommand] resign leadership : input(192.168.10.184:7001) 2024-10-11 15:12:39 info cmd/syncer.go:547 [SyncerCommand] campaign : key(/redis-gunyu/redis1/input-election/192.168.10.179:7001/), new_role(leader) 2024-10-11 15:12:39 info syncer/input.go:280 [RedisInput(192.168.10.184:7001)] psync : runId(0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9 - 0000000000000000000000000000000000000000), local({0 0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9 2793529386}), output({0 0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9 2793529386}), reply({0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9 2793529386}), rdb(0) 2024-10-11 15:12:39 info syncer/output.go:673 [RedisOutput(192.168.10.185:7001)] command parser is stopped 2024-10-11 15:12:39 error syncer/replica.go:217 [ReplicaLeader(192.168.10.185:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 warn syncer/replica.go:77 [ReplicaLeader(192.168.10.185:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 error cmd/syncer_api.go:137 [SyncerCommand] Sync error : addr(192.168.10.185:7001), err(err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose])) 2024-10-11 15:12:39 info cmd/syncer.go:574 [SyncerCommand] syncer is stopped : <nil> 2024-10-11 15:12:39 info syncer/output.go:285 [RedisOutput(192.168.10.183:7001)] send aof done : runId(a9cedf78504ffe227f532409fce939ffb63d1161), offset(2587145971), size(-1) 2024-10-11 15:12:39 info syncer/output.go:570 [RedisOutput(192.168.10.184:7001)] send aof : runId(0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9), offset(2793529386), size(-1) 2024-10-11 15:12:39 info cmd/syncer.go:592 [SyncerCommand] resign leadership : input(192.168.10.185:7001) 2024-10-11 15:12:39 info cmd/syncer.go:547 [SyncerCommand] campaign : key(/redis-gunyu/redis1/input-election/192.168.10.180:7001/), new_role(leader) 2024-10-11 15:12:39 info syncer/input.go:280 [RedisInput(192.168.10.185:7001)] psync : runId(58e4e08d823b6c89b3c27e95a03ae67dcde591fd - 0000000000000000000000000000000000000000), local({0 58e4e08d823b6c89b3c27e95a03ae67dcde591fd 2532438352}), output({0 58e4e08d823b6c89b3c27e95a03ae67dcde591fd 2532438352}), reply({58e4e08d823b6c89b3c27e95a03ae67dcde591fd 2532438352}), rdb(0) 2024-10-11 15:12:39 info syncer/output.go:673 [RedisOutput(192.168.10.183:7001)] command parser is stopped 2024-10-11 15:12:39 error syncer/replica.go:217 [ReplicaLeader(192.168.10.183:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 warn syncer/replica.go:77 [ReplicaLeader(192.168.10.183:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 error cmd/syncer_api.go:137 [SyncerCommand] Sync error : addr(192.168.10.183:7001), err(err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose])) 2024-10-11 15:12:39 info cmd/syncer.go:574 [SyncerCommand] syncer is stopped : <nil> 2024-10-11 15:12:39 info syncer/output.go:570 [RedisOutput(192.168.10.185:7001)] send aof : runId(58e4e08d823b6c89b3c27e95a03ae67dcde591fd), offset(2532438352), size(-1) 2024-10-11 15:12:39 info syncer/output.go:285 [RedisOutput(192.168.10.181:7001)] send aof done : runId(5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9), offset(3607454), size(-1) 2024-10-11 15:12:39 info cmd/syncer.go:592 [SyncerCommand] resign leadership : input(192.168.10.183:7001) 2024-10-11 15:12:39 info cmd/syncer.go:547 [SyncerCommand] campaign : key(/redis-gunyu/redis1/input-election/192.168.10.182:7001/), new_role(leader) 2024-10-11 15:12:39 info syncer/input.go:280 [RedisInput(192.168.10.183:7001)] psync : runId(a9cedf78504ffe227f532409fce939ffb63d1161 - 0000000000000000000000000000000000000000), local({0 a9cedf78504ffe227f532409fce939ffb63d1161 2587146321}), output({0 a9cedf78504ffe227f532409fce939ffb63d1161 2587146321}), reply({a9cedf78504ffe227f532409fce939ffb63d1161 2587146321}), rdb(0) 2024-10-11 15:12:39 info syncer/output.go:570 [RedisOutput(192.168.10.183:7001)] send aof : runId(a9cedf78504ffe227f532409fce939ffb63d1161), offset(2587146321), size(-1) 2024-10-11 15:12:39 error syncer/replica.go:217 [ReplicaLeader(192.168.10.181:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 info syncer/output.go:673 [RedisOutput(192.168.10.181:7001)] command parser is stopped 2024-10-11 15:12:39 warn syncer/replica.go:77 [ReplicaLeader(192.168.10.181:7001)] err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose]) 2024-10-11 15:12:39 error cmd/syncer_api.go:137 [SyncerCommand] Sync error : addr(192.168.10.181:7001), err(err(EOF), stack([github.com/mgtv-tech/redis-GunYu/pkg/errors.WithStack(/mnt/e/pr1/redis-GunYu/pkg/errors/errors.go:27)]->[github.com/mgtv-tech/redis-GunYu/pkg/io/pipe.(*pipe).WClose])) 2024-10-11 15:12:39 info cmd/syncer.go:574 [SyncerCommand] syncer is stopped : <nil> 2024-10-11 15:12:39 info cmd/syncer.go:592 [SyncerCommand] resign leadership : input(192.168.10.181:7001) 2024-10-11 15:12:39 info cmd/syncer.go:547 [SyncerCommand] campaign : key(/redis-gunyu/redis1/input-election/192.168.10.186:7001/), new_role(leader) 2024-10-11 15:12:39 info syncer/input.go:280 [RedisInput(192.168.10.181:7001)] psync : runId(5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9 - 0000000000000000000000000000000000000000), local({0 5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9 3607804}), output({0 5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9 3607804}), reply({5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9 3607804}), rdb(0) 2024-10-11 15:12:39 info syncer/output.go:570 [RedisOutput(192.168.10.181:7001)] send aof : runId(5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9), offset(3607804), size(-1) 2024-10-11 15:12:42 info syncer/replica.go:132 [ReplicaLeader(192.168.10.184:7001)] server handshake : startPoint({0 0e4f40f0b7bc6fd83d5941e6aa101ca679a5fef9 2793530528}), follower(:0) 2024-10-11 15:12:42 info syncer/replica.go:196 [ReplicaLeader(192.168.10.184:7001)] start to send data to follower : offset(2793529386), size(-1) 2024-10-11 15:12:42 info syncer/replica.go:132 [ReplicaLeader(192.168.10.185:7001)] server handshake : startPoint({0 58e4e08d823b6c89b3c27e95a03ae67dcde591fd 2532438352}), follower(:0) 2024-10-11 15:12:42 info syncer/replica.go:196 [ReplicaLeader(192.168.10.185:7001)] start to send data to follower : offset(2532438352), size(-1) 2024-10-11 15:12:42 info syncer/replica.go:132 [ReplicaLeader(192.168.10.183:7001)] server handshake : startPoint({0 a9cedf78504ffe227f532409fce939ffb63d1161 2587146321}), follower(:0) 2024-10-11 15:12:42 info syncer/replica.go:196 [ReplicaLeader(192.168.10.183:7001)] start to send data to follower : offset(2587146321), size(-1) 2024-10-11 15:12:42 info syncer/replica.go:132 [ReplicaLeader(192.168.10.181:7001)] server handshake : startPoint({0 5dfae8bc275cb3f259a50f2cb64e9d2b9eca5dd9 3607818}), follower(:0) 2024-10-11 15:12:42 info syncer/replica.go:196 [ReplicaLeader(192.168.10.181:7001)] start to send data to follower : offset(3607804), size(-1) 2024-10-11 15:12:44 info syncer/output.go:254 [RedisOutput(192.168.10.184:7001)] stats : filterCmd(0), sendCmd(21) 2024-10-11 15:12:44 info syncer/output.go:254 [RedisOutput(192.168.10.185:7001)] stats : filterCmd(0), sendCmd(1) 2024-10-11 15:12:44 info syncer/output.go:254 [RedisOutput(192.168.10.183:7001)] stats : filterCmd(0), sendCmd(1) 2024-10-11 15:12:44 info syncer/output.go:254 [RedisOutput(192.168.10.181:7001)] stats : filterCmd(0), sendCmd(1) 2024-10-11 15:12:49 info syncer/output.go:254 [RedisOutput(192.168.10.184:7001)] stats : filterCmd(0), sendCmd(22)
不好意思,这是v1.0.3版本引入的新bug,我修复下
已经修复了。重新发版了
server_api中pause的作用是暂停同步么? 我这边测试pause。起不到暂定同步的作用。打印了一些日志,又开始继续同步任务