kishorenc
695c44dc17
Forward status code and content type properly.
2020-09-05 18:56:39 +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
10957633fb
Request-side import streaming via follower is working.
2020-09-01 20:12:08 +05:30
kishorenc
1f726d747a
Add logging for auth key handling.
2020-08-29 08:08:37 +05:30
kishorenc
a55b929203
Reset peers should be called only in single-node setup.
...
In a clustered setup, this leads to nasty consistency issues.
2020-08-22 09:10:44 +05:30
kishorenc
030dc5ca35
Fix http2 async import.
2020-08-21 18:02:06 +05:30
kishorenc
09541e5311
Parameterize number of indices per collection.
2020-08-19 12:29:59 +05:30
kishorenc
4a173ee49d
Streaming import basics.
2020-08-16 20:17:07 +05:30
kishorenc
7b7af9453d
Set original response content type when proxying to leader.
2020-08-06 12:10:30 +05:30
kishorenc
e64805320b
Address some warnings.
2020-07-03 15:10:44 +05:30
kishorenc
e314ec23e6
Move to glog.
2020-06-22 18:17:52 +05:30
kishorenc
560d21d4b5
Tweak aliveness check with better heuristics.
2020-05-12 19:26:36 +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
e5af0de7ee
Forcefully reset peers when leader is not found.
...
Otherwise, a follower could be stuck in trying to reconnect to older peers in the event of majority nodes being replaced.
2020-05-05 18:16:43 +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
51751032c0
Rename http response setters for clarity.
2020-04-02 18:43:23 +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
5d424b5d38
Implement PUT + fix JSON response for forwarded requests.
2020-04-02 13:41:59 +05:30
kishorenc
89690101ae
Make route_hash unsigned.
2020-04-01 18:30:06 +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
75a1fe1e1d
Use hashmap for storing routes instead of an array.
...
The use of array index makes rolling updates tricky since requests might be forwarded to an instance running an older/newer version having a different route index.
2020-03-26 14:08:06 +05:30
kishorenc
8bfeeeb2ee
Fix forwarding of delete operations.
2020-03-25 21:31:56 +05:30
kishorenc
7cc8acfe45
Handle error from init_db.
2020-03-23 21:52:57 +05:30
kishorenc
43231eaae3
Only start API service when peering service is stable.
2020-03-23 21:38:41 +05:30
kishorenc
3cb4c3a3b6
Reject writes to a follower when there is no leader.
2020-03-23 19:21:25 +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
df08df5d96
Exit cleanly from raft service on validation errors.
2020-03-17 07:43:22 +05:30
kishorenc
123888d4d3
When no --peers
arg is given, start single node cluster.
2020-03-15 20:33:13 +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