Commit graph

287 commits

Author SHA1 Message Date
Travis Turner
83b9ddacba Merge pull request #1552 from travisturner/translate-cluster-fix
Translate cluster fix

(cherry picked from commit 5802ba37b2)
2018-07-31 20:02:29 -05:00
Matt Jaffee
b7e5f8842e
add a configurable timeout to http handler closing
refactor handler Close func to use errgroup to be a bit less messy.

refactor pilosa.Server closing to actually return an underlying error if one occurs

add option to pilosa/test.Cluster and pilosa/server.Command to control close
timeout. currently is only used by the http handler, but conceivably could be
passed as a parameter to other subsystems of pilosa/server.Command
2018-07-10 15:16:35 -05:00
Travis Turner
1723616aac
add gossip Closer 2018-07-10 11:41:54 -05:00
Travis Turner
d22507d36d
rename gossip.NewGossipMemberSet to gossip.NewMemberSet 2018-07-09 17:05:58 -05:00
Travis Turner
babdb5ff4e
adjust test to account for new source of error downstream 2018-07-06 17:38:06 -05:00
Cody Soyland
50d57ec229 Unexport server.DefaultDiagnosticsInterval (in release tag) 2018-07-05 23:11:57 -05:00
Cody Soyland
167e41787f Unexport server.NewStatsClient 2018-07-05 23:11:56 -05:00
Cody Soyland
94e633b7eb Unexport server.DefaultDiagnosticsInterval 2018-07-05 23:11:56 -05:00
Cody Soyland
6023474ed4 Unexport server.Command.SetupNetworking 2018-07-05 23:11:56 -05:00
Matt Jaffee
d032c8941f
Merge branch 'develop' into dead-code-removal 2018-07-05 18:02:39 -05:00
Matt Jaffee
21cf6b6e57
remove URI getters since the fields were exported for serialization 2018-07-05 17:59:18 -05:00
Matt Jaffee
0a94d2f10d
Merge branch 'develop' into core-structs 2018-07-05 16:38:14 -05:00
Matt Jaffee
a164233c92
fix handler tests not to use internal and fix bug 2018-07-05 16:21:27 -05:00
Cody Soyland
da4cd84820 Remove some dead code 2018-07-05 15:31:07 -05:00
Matt Jaffee
2cec75e399
add proto encoding subpackage and use for send and receive message 2018-07-05 12:00:42 -05:00
Travis Turner
44f0b992f6
change all CreateField() methods to take functional options instead of FieldOptions 2018-07-04 21:22:35 -05:00
Matt Jaffee
5ff77c816a
get rid of unecessary server stuff and export node and uri 2018-07-03 13:26:51 -05:00
Matt Jaffee
f6aef32093
make gossip's interface to Pilosa the API struct rather than effectively being pilosa.Server 2018-07-03 12:58:18 -05:00
Travis Turner
cba91be126
move internal http endpoints under /internal 2018-07-02 08:48:23 -05:00
Travis Turner
3adc3f5978
add tests for index and field success responses 2018-07-01 19:54:09 -05:00
Travis Turner
7dd1f50a75
consolidate http errors into a shared response type 2018-07-01 19:54:09 -05:00
Travis Turner
5dd7a9556a
rename slice to shard 2018-06-28 14:07:07 -05:00
Cody Soyland
824474160e Enhance test utilities (introduce Cluster type, improve naming) 2018-06-28 13:34:58 -05:00
Travis Turner
22661f3571
Merge branch 'develop' into field-options 2018-06-28 10:20:17 -05:00
Matt Jaffee
ea448fee9c
remove remaining external references to Server.Cluster 2018-06-27 13:37:07 -05:00
Matt Jaffee
fbe035ef25
simplify test cluster setup by exposing gossip transport on server.Command 2018-06-27 10:46:37 -05:00
Matt Jaffee
41bdfceb57
remove MemberSet from cluster, Open in server package 2018-06-27 07:22:32 -05:00
Matt Jaffee
c312bc1316
simplify arguments to NewGossipMemberSet 2018-06-27 07:18:16 -05:00
Travis Turner
6ab2729f0c
Merge branch 'develop' into field-options 2018-06-26 23:39:42 -05:00
Matt Jaffee
bcb6942c80
continue simplifying memberset and pilosa setup
since the gossip MemberSet has access to Server, it wasn't really necessary to
pass it a Node object when calling Open on it from Cluster. The end goal is to
have it be removed from Cluster entirely, and have it be Opened externally, and
this is a step toward that.

Exposing Node method on Server doesn't really expose any more than was already
there as the same info can be gotten from LocalStatus with a bit of type
casting. I figured adding the method was a little cleaner, and we could collapse
all the functionality when the dust has settled.

The Cluster.open method has been broken into two parts - one of which happens
earlier (at NewServer time), and the other will eventually just be "waiting to
make sure we've joined the cluster". Right now it's calling Memberset.Open, and
then waiting to make sure the cluster has been joined.
2018-06-26 14:36:05 -05:00
Matt Jaffee
d9b4cfacb0
Merge branch 'develop' into fix-translate-merged 2018-06-26 12:51:41 -05:00
Matt Jaffee
3314a0372c
Merge branch 'develop' into simplify-event-receiver 2018-06-26 11:45:14 -05:00
Cody Soyland
533de70cbd Allow passing slice of CommandOptions to MustRunMainWithCluster, each slice going to one Command 2018-06-26 11:22:48 -05:00
Cody Soyland
e448d47004 Store commandOptions on test.Main for use in Reopen(); unexport serverOptions 2018-06-26 08:47:31 -05:00
Matt Jaffee
ee37152cd5
consolidate gossipEventReceiver into gossip member set
pilosa.Server now implements StatusHandler and EventReceiver and needs only
start a gossip memberset. A gossip member set now takes a server as an argument
explicitly and the maze of handlers and receivers and the starting sequence is
somewhat simplified.

Server now trivially implements EventHandler by passing the call along to its
Cluster object which has the actual implementation. This means that less things
will need to refer to cluster.
2018-06-26 07:50:33 -05:00
Cody Soyland
9f68ea4663 Use OptCommandServerOptions to inject mock TranslateStore 2018-06-25 17:22:34 -05:00
Travis Turner
50794bf63b
move fieldOptions unmarshal to the handler
validate fieldOptions in http package
2018-06-25 15:14:22 -05:00
Cody Soyland
324028a8c2 Add ability to pass ServerOptions when calling NewCommand 2018-06-25 15:09:36 -05:00
Matt Jaffee
b2dd9c50ca
Merge branch 'develop' into fix-translate 2018-06-25 12:33:52 -05:00
Matt Jaffee
6093064ac0
remove unecessary test and convert import test 2018-06-22 16:26:45 -05:00
Matt Jaffee
ba9112507d
fix server/handler_test.go for newpql 2018-06-22 12:57:28 -05:00
Matt Jaffee
7a5adf7428
Merge branch 'develop' into wip-api-refactor 2018-06-22 12:46:19 -05:00
Matt Jaffee
6b57369b51
fix stats tests 2018-06-22 10:44:36 -05:00
Matt Jaffee
80f5b13a97
Merge branch 'develop' into newpql 2018-06-22 09:11:00 -05:00
Alan Bernstein
35526dd0d7 Update to new PQL syntax beyond the parser 2018-06-22 08:11:27 -05:00
Matt Jaffee
3c4ba82a4a
finish conversion of handler tests 2018-06-22 08:08:53 -05:00
Matt Jaffee
8809751a23
convert all tests except for CORS 2018-06-22 07:41:39 -05:00
Matt Jaffee
016dbac6ca
convert a bunch more tests 2018-06-21 19:24:17 -05:00
Matt Jaffee
504309e594
rewrite some tests to not be skipped 2018-06-21 15:06:22 -05:00
Matt Jaffee
a033771412
move handler tests which are actually testing everything to server package 2018-06-21 14:05:00 -05:00