Commit graph

192 commits

Author SHA1 Message Date
Ben Johnson
f4c9c0fed3
Maintain available shards set.
This commit removes the previous `MaxShard` tracking and replaces
it with an `Available Shards` set tracking. This allows sparse shard
tracking without implicitly tracking all shards in between.
2018-08-22 07:57:58 -06:00
Matt Jaffee
e16c43c3bc
Merge branch 'master' into 1492-ae-and-resize 2018-08-20 09:13:35 -05:00
Travis Turner
b304de6536
Treat coordinator as primary translate store.
Daisy-chain other nodes based on their position in the cluster.
Deprecate the `primary-url` configuration option.
2018-08-13 11:06:16 -05:00
Matt Jaffee
1901ffada6
make sure cluster gets into DEGRADED state when adding nodes
previously, losing a node could cause the cluster to go from NORMAL->DEGRADED,
but adding a node would not cause it to go from STARTING->DEGRADED. Cody brought
this up in code review.
2018-08-08 19:42:30 -05:00
Matt Jaffee
0e467e5492
rename cluster.nodes and fix race in API 2018-08-08 15:11:39 -05:00
Matt Jaffee
16eff6de8c
prevent anti entropy and cluster resize from running simultaneously 2018-08-08 14:41:54 -05:00
Matt Jaffee
bb32706cb6
support DEGRADED in removeNode
now, nodes which have failed and been removed from the running cluster state can
still be manually removed to trigger a cluster resize event. This is important
because otherwise there is no way to cause the cluster to resize itself if a
node fails and you don't want to add a node to replace it.
2018-08-06 16:55:23 -05:00
Matt Jaffee
ba5b46898f
fix determineClusterState bug and add more test cases 2018-08-06 14:55:38 -05:00
Matt Jaffee
48af3adc21
add degraded cluster state and handle node failure
cluster is in degraded state when some number of nodes greater than 0 but less
than replicaN have failed. This is sort of a hybrid of "STARTING" and "NORMAL"
states because we can still respond to queries as in the NORMAL state, but we
need to be alert to re-add nodes to the cluster if they come back online which
required some changes to the cluster logic.

In order to make debugging easier, the test.MustRunCluster functionality now
names the nodes in the cluster explicitly as "node0", "node1", etc. "node0" is
the coordinator.

A number of TODOs are left in the test for scenarios that need to be checked.
2018-08-06 11:57:24 -05:00
Cody Soyland
e9523063b5 Fix linter issues: unused 2018-07-20 10:33:29 -05:00
Cody Soyland
187ded0a52 Fix linter issues: maligned 2018-07-19 11:07:59 -05:00
Matt Jaffee
30e0d42c3d
remove incorrect nodeJoin comment 2018-07-19 09:43:48 -05:00
Matt Jaffee
774e91ad30
finish commenting methods as unprotected. 2018-07-19 09:40:23 -05:00
Matt Jaffee
3b8b190849
add nolint unparam for setStateAndBroadcast 2018-07-19 09:17:36 -05:00
Matt Jaffee
d8597f320a
Merge branch 'master' into 1370-cluster-locking 2018-07-19 08:57:28 -05:00
Matt Jaffee
e1e4df67bc
fix race conds and add more locking/annotation 2018-07-18 16:47:24 -05:00
Cody Soyland
a962a0c526 Fix linter issues: deadcode 2018-07-17 17:17:42 -05:00
Matt Jaffee
fa755fdd81
fix ClusterCluster not to broadcast to self.
stops deadlock when cluster has appropriate internal locking
2018-07-17 16:34:49 -05:00
Matt Jaffee
7efdacd028
rename setState to unprotected 2018-07-17 16:34:48 -05:00
Matt Jaffee
18321b88f9
rename setID as unprotected and add some "unprotected" comments 2018-07-17 16:34:48 -05:00
Matt Jaffee
04bdc67d7f
rename a few things to unprotected* and use safe coordinatorNode in setNodeState 2018-07-17 16:34:48 -05:00
Matt Jaffee
8b2d8295d1
rename cluster.coordinatorNode to unprotectedCoordinatorNode 2018-07-17 16:34:48 -05:00
Cody Soyland
f9625ef4fa Fix linter issues: unparam 2018-07-17 12:05:07 -05:00
Cody Soyland
1af66417e1 Unexport Topology.ClusterID 2018-07-05 23:11:56 -05:00
Cody Soyland
9c160ee65e Unexport Topology.NodeIDs 2018-07-05 23:11:56 -05:00
Cody Soyland
e52f713406 Unexport Topology.RemoveID 2018-07-05 23:11:56 -05:00
Cody Soyland
65472609a5 Unexport Topology.Encode 2018-07-05 23:11:56 -05:00
Cody Soyland
3f7f82bf05 Unexport Topology.AddID 2018-07-05 23:11:56 -05:00
Cody Soyland
3e91a0d32c Unexport NodeStateReady 2018-07-05 23:11:56 -05:00
Cody Soyland
9222ef0df7 Unexport NodeIDs 2018-07-05 23:11:56 -05:00
Cody Soyland
2031345c86 Unexport NewTopology 2018-07-05 23:11:56 -05:00
Cody Soyland
0907ee5854 Unexport NewNopInternalClient 2018-07-05 23:11:56 -05:00
Cody Soyland
c102143b50 Unexport DefaultPartitionN 2018-07-05 23:11:56 -05:00
Matt Jaffee
e33682cfd2
address feedback 2018-07-05 17:38:49 -05:00
Matt Jaffee
0a94d2f10d
Merge branch 'develop' into core-structs 2018-07-05 16:38:14 -05:00
Matt Jaffee
bbb93abd57
remove lots of unused code 2018-07-05 15:35:32 -05:00
Matt Jaffee
2cec75e399
add proto encoding subpackage and use for send and receive message 2018-07-05 12:00:42 -05:00
Matt Jaffee
1b2aaa26bf
export NodeEvent 2018-07-05 09:26:58 -05:00
Matt Jaffee
6417f468bb
wip implement more... still quite broken 2018-07-04 16:50:20 -05:00
Travis Turner
1fb8330c8c
remove some dead code highlighed by the unexport script 2018-07-04 12:27:42 -05:00
Matt Jaffee
4ef8fff9b6
WIP, broken. refactoring to isolate intneral structs and define core structs 2018-07-04 07:29:16 -05:00
Matt Jaffee
06ad83b64b
more unexports - index methods and fields 2018-07-03 08:10:33 -05:00
Matt Jaffee
f78af41565
unexport cluster's newhasher func 2018-07-02 17:25:21 -05:00
Matt Jaffee
009242fef9
unexport more Holder stuff (gorename) 2018-07-02 14:07:06 -05:00
Matt Jaffee
9995b0032e
unexport Holder.Fragment, HolderSyncer and HolderCleaner 2018-07-02 14:00:31 -05:00
Matt Jaffee
4182678d5a
work on unexporting View stuff 2018-07-02 10:11:56 -05:00
Matt Jaffee
3be609ed10
unexport newCluster and some other stuff 2018-07-02 09:10:09 -05:00
Matt Jaffee
9ea300da20
unexport broadcaster 2018-07-02 08:34:58 -05:00
Matt Jaffee
7801b81b10
unexport cluster (gorename) 2018-07-02 07:56:51 -05:00
Matt Jaffee
2e15db7ce0
Merge branch 'develop' into more-gossip-stuff 2018-06-29 06:49:13 -05:00