24 Commits

Author SHA1 Message Date
kishorenc
efae9055bc Don't mark follower as not caught up for small lags. 2020-09-18 16:52:00 +05:30
kishorenc
a2b421209c Protect API until follower has caught up with leader.
The catch up threshold is configurable as well. Default: 95%
2020-09-17 18:00:32 +05:30
kishorenc
6593d959ec Set min snapshot index gap to 1. 2020-09-10 21:35:55 +05:30
kishorenc
1b01de0c0c Housekeeping tasks. 2020-09-07 21:25:04 +05:30
kishorenc
58b52687ea Handle disconnects during import. 2020-09-04 15:12:09 +05:30
kishorenc
6d7c6b2ea0 Implemented import streaming end-to-end on follower. 2020-09-03 20:44:39 +05:30
kishorenc
02dd4a8a4f Use direct node API for checking leader status.
Otherwise, configuration refresh was getting stuck in a race condition when leader term is not updated while stepping down.
The actual error was "Doing another configuration change".
2020-09-02 11:16:32 +05:30
kishorenc
d9b08d4a90 Handle membership changes more gracefully.
Check for majority going out of sync and reset peers when that happens.
2020-05-10 19:09:40 +05:30
kishorenc
6342465a30 Return server state in debug response. 2020-05-05 20:06:14 +05:30
kishorenc
9ca4938045 Use nodes instead of peers for connection string. 2020-04-18 14:10:33 +05:30
kishorenc
3ac4cfa44b Ensure that the peering service listens only on internal IP. 2020-04-17 18:41:38 +05:30
kishorenc
deeec05f69 Make health check consider underlying replication state. 2020-04-02 18:38:58 +05:30
kishorenc
b9bc0bd31a Synchronize start of API and state services. 2020-04-02 14:38:55 +05:30
kishorenc
8829c5aebc Allow customization of peering address.
This is an optional argument since Typesense automatically tries to bind on an internal IP. One needs to specify this only when there are multiple internal IPs.
2020-03-26 17:39:42 +05:30
kishorenc
43231eaae3 Only start API service when peering service is stable. 2020-03-23 21:38:41 +05:30
kishorenc
b16614eb20 Follower should forward write requests to leader. 2020-03-23 08:53:58 +05:30
kishorenc
1cd9793d69 Reject writes to followers. 2020-03-20 22:31:40 +05:30
kishorenc
e057b64d9d Migrate to butil logger. 2020-03-20 16:49:26 +05:30
kishorenc
637ba52769 Delete DB cleanly before restore. 2020-03-15 18:52:26 +05:30
kishorenc
b7f9a2ca28 Handle import of raw db data into snapshot. 2020-03-15 17:08:44 +05:30
kishorenc
a52ec80999 Handle presence/absence of snapshot.
Still need to handle import of raw db data into snapshot.
2020-03-15 16:11:29 +05:30
kishorenc
b81ce1062d Basic write replication is working. 2020-03-11 22:31:17 +05:30
kishorenc
a975f39685 Refactor http code to remove circular references. 2020-03-11 16:13:14 +05:30
kishorenc
eb0c66d778 Basic raft clustering is working.
Still need to handle actual stateful operations.
2020-03-08 21:22:48 +05:30