Comments (5)
Hi Aaron, The RAFTPEERS
command will return a list of the peers and their status.
127.0.0.1:7481> raftpeers
1) "127.0.0.1:7481"
2) "Leader"
3) "127.0.0.1:7482"
4) "Follower"
5) "127.0.0.1:7483"
6) "Follower"
This is useful if you want to look for failures or log leadership changes, such as for cluster diagnostics.
Even with a sane cluster with all nodes running 100%, there will occasionally be leadership changes. As long as your client connection follows the -TRY <addr>
responses and updates the leader, you should be good.
from summitdb.
Thanks!
I now appear to be bumping up against the "What is redigo actually returning..." problem similar to an issue I filed for Tile-38.
I tried the OUTPUT json
trick but it doesn't appear that SummitDB knows about this? Thoughts?
https://github.com/thisisaaronland/go-artisanal-integers/compare/peers
./bin/int -engine summitdb -dsn 'redis://localhost:7482'
2017/03/27 20:19:26 [[49 50 55 46 48 46 48 46 49 58 55 52 56 49] [73 110 118 97 108 105 100] [49 50 55 46 48 46 48 46 49 58 55 52 56 50] [70 111 108 108 111 119 101 114] [49 50 55 46 48 46 48 46 49 58 55 52 56 51] [76 101 97 100 101 114]]
from summitdb.
That's an array of bulk strings. The redis.Strings(conn.Do("RAFTPEERS"))
should work.
from summitdb.
Bingo, thanks! One day I will figure out redigo responses...
./bin/int -engine summitdb -dsn 'redis://localhost:7482'
2017/03/27 20:49:28 127.0.0.1:7481
2017/03/27 20:49:28 Invalid
2017/03/27 20:49:28 127.0.0.1:7482
2017/03/27 20:49:28 Follower
2017/03/27 20:49:28 127.0.0.1:7483
2017/03/27 20:49:28 Leader
summitdb told me to try redis://127.0.0.1:7483 instead, so here we go...
from summitdb.
I agree. Redigo can take a little getting use to.
from summitdb.
Related Issues (20)
- Q: read the last FENCE token without incrementing? HOT 1
- missing server means new leader complains forever; needs to avoid spamming its logs HOT 2
- Q: transactions or pipelined commands? HOT 3
- can't create cluster over localhost:7777 tunneled connection HOT 5
- Unable to join cluster HOT 9
- Getting Started - FreeBSD Incorrect Download Path HOT 6
- support for list data structure HOT 3
- Can't join cluster: "peer already known" HOT 2
- how to implement distributed lock with fencing tokens? HOT 1
- Kubernetes Statefulset
- Will you support authentication and TLS? HOT 1
- active project? HOT 1
- FYI: works fine on AArch64... HOT 1
- Q: SummitDB as embedded DB? HOT 1
- Question: what happened when out of memory? HOT 2
- Is it neccessary to open buntdb in file mode? HOT 3
- What happend when a command is committed but has errors when apply it? HOT 3
- The raft.db will grow unlimitedly? HOT 1
- Docs mention Lua eventhough Javascript is used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from summitdb.