Commit graph

3910 commits

Author SHA1 Message Date
Travis Turner
ceaf97de60
add translate tests to ensure that adding/removing replica nodes behaves as expected 2018-08-13 11:06:16 -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
Matthew Jaffee
6070db077c
Merge pull request #1584 from jaffee/1249-node-failure
Add DEGRADED cluster state and handle gossip NodeLeave events correctly
2018-08-09 09:39:23 -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
6e99a8757d
remove unnecessary memberlist constraint 2018-08-08 19:25: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
205857e765
Merge pull request #1544 from codysoyland/1517-metalinter-unconvert
Fix linter issues: unconvert
2018-08-02 12:17:27 -05:00
Cody Soyland
e76c523135
Merge branch 'master' into 1517-metalinter-unconvert 2018-08-02 11:45:24 -05:00
Cody Soyland
c31b8c9b79
Merge pull request #1543 from codysoyland/1513-metalinter-megacheck
Fix linter issues: megacheck (unused/staticcheck/gosimple)
2018-08-02 11:44:46 -05:00
Cody Soyland
d344876587 Increase gometalinter deadline 2018-08-02 10:59:29 -05:00
Cody Soyland
f6855fac62 Remove unused newMockReadCloser 2018-08-02 10:59:16 -05:00
Cody Soyland
dd7b5f517b
Merge branch 'master' into 1513-metalinter-megacheck 2018-08-02 10:29:47 -05:00
Cody Soyland
1774efaf19
Merge pull request #1571 from codysoyland/skip-flawed-translator-test
Skip flawed translator test
2018-08-01 11:23:05 -05:00
Cody Soyland
495b4259fd Skip flawed translator test 2018-08-01 10:57:56 -05:00
Cody Soyland
edf6fa9c67
Merge pull request #1568 from codysoyland/translator-test-sleep
Add more time to sleep in translator tests due to CI failures
2018-07-31 21:05:49 -05:00
Cody Soyland
c44bb65163 Add more time to sleep in translator tests due to CI failures 2018-07-31 20:39:05 -05:00
Travis Turner
5802ba37b2
Merge pull request #1552 from travisturner/translate-cluster-fix
Translate cluster fix
2018-07-31 16:39:33 -05:00
Travis Turner
2dd655f0e9
move sleep to be after replica sync 2018-07-31 16:01:42 -05:00
Cody Soyland
68dc6489ce
Merge branch 'master' into translate-cluster-fix 2018-07-31 15:13:31 -05:00
Cody Soyland
672563891e
Merge pull request #1558 from codysoyland/go-master-error
Use string prefix instead of equality so json error message will pass on all Go versions
2018-07-31 15:13:15 -05:00
Cody Soyland
ba3bda6ac2 Use string prefix instead of equality so json error message will pass on all Go versions 2018-07-31 14:16:17 -05:00
Cody Soyland
39a82091f2 Add sleep in tests to ensure writes make it to translate store 2018-07-31 14:11:24 -05:00
Cody Soyland
be60a91a58 Clarify error string for cases when reading from non-primary translate store when given non-existent key 2018-07-31 12:19:09 -05:00
Cody Soyland
0816ea8ecb Add sleep to test to wait for key replication 2018-07-31 12:11:21 -05:00
Cody Soyland
e79cd4b199 Add JSON parsing to translator test to verify keys 2018-07-31 11:40:30 -05:00
Cody Soyland
2739ce436c Merge remote-tracking branch 'travisturner/translate-cluster-fix' into translate-cluster-fix 2018-07-31 08:36:31 -05:00
Travis Turner
ac8f8aa2e4
remove incorrect mock implementation from tranlate test 2018-07-30 11:45:34 -05:00
Travis Turner
3ffafaca4a
ignore remote translation 2018-07-30 11:45:34 -05:00
Cody Soyland
5410dcd6b1
Fix errant references of server.primaryTranslateStore to server.translateFile 2018-07-30 11:45:34 -05:00
Travis Turner
45d89d7136
Merge pull request #1555 from travisturner/setrowattrs-with-rowkeys
update parser to handle row keys on SetRowAttrs()
2018-07-27 11:44:54 -05:00
Travis Turner
13c201d768
remove errant spew.Dump() 2018-07-27 11:15:22 -05:00
Travis Turner
dfd529b2f5
update parser to handle row keys on SetRowAttrs() 2018-07-27 10:50:04 -05:00
Matthew Jaffee
ada9857f35
Merge pull request #1551 from jaffee/1550-topn-doc
fix topn spec and example in docs
2018-07-26 09:30:01 -05:00
Matt Jaffee
f90a6dff8b
fix topn spec and example in docs 2018-07-26 08:12:50 -05:00
Cody Soyland
ca800c683e Add test for cluster translator 2018-07-24 14:57:06 -05:00
Cody Soyland
a427836a9a Fix errant references of server.primaryTranslateStore to server.translateFile 2018-07-24 10:06:20 -05:00
Travis Turner
3b0eb3068f
Merge pull request #1547 from travisturner/index-options
fix places where empty IndexOptions were being used
2018-07-23 21:57:37 -05:00
Travis Turner
f9a265f94d
fix places where empty IndexOptions were being used 2018-07-23 17:23:54 -05:00
Cody Soyland
dc50204846 Fix linter issues: unconvert 2018-07-20 11:51:55 -05:00
Cody Soyland
990780bd93 Fix linter issues: staticcheck (covered by megacheck, along with gosimple and unused) 2018-07-20 11:19:24 -05:00
Cody Soyland
e9523063b5 Fix linter issues: unused 2018-07-20 10:33:29 -05:00
Cody Soyland
f01d850b17 Fix linter issues: gosimple 2018-07-20 09:06:43 -05:00
Cody Soyland
c7e29b48f9
Merge pull request #1540 from codysoyland/1521-metalinter-vet
Fix linter issues: vet
2018-07-19 16:01:10 -05:00
Cody Soyland
ba0384fb52 Merge branch 'master' into 1521-metalinter-vet 2018-07-19 15:41:28 -05:00
Cody Soyland
cf6921fce2
Merge pull request #1542 from codysoyland/index-options-json
Add IndexOptions to IndexInfo json response
2018-07-19 15:37:29 -05:00
Cody Soyland
83372c0509
Merge branch 'master' into index-options-json 2018-07-19 15:37:08 -05:00
Travis Turner
383b758c41
Merge pull request #1524 from travisturner/mutex-field-type
add mutex field type
2018-07-19 15:17:05 -05:00
Cody Soyland
86185a7530
Merge branch 'master' into index-options-json 2018-07-19 14:51:43 -05:00