Commit graph

138 commits

Author SHA1 Message Date
Matt Jaffee
41bdfceb57
remove MemberSet from cluster, Open in server package 2018-06-27 07:22:32 -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
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
Matt Jaffee
7a5adf7428
Merge branch 'develop' into wip-api-refactor 2018-06-22 12:46:19 -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
c9479afe8c
start handler before server.Open to avoid stall in cluster.open
cluster.open waits for node to join cluster if it is not the coordinator, and
currently this relies on having the http handler able to receive messages, so
handler needs to be started first.
2018-06-21 13:56:46 -05:00
Matt Jaffee
343880e0ad
remove broadcaster from server 2018-06-20 13:13:35 -05:00
Matt Jaffee
69b1f2ea97
make behavior equivalent to pre-change to stop test from failing 2018-06-19 17:02:44 -05:00
Matt Jaffee
33b3a14b24
move static cluster setup logic into Server/Cluster 2018-06-19 16:28:54 -05:00
Matt Jaffee
56ed9bfbe1
remove broadcaster methods from gossip- don't use sendAsync anywhere 2018-06-18 18:47:29 -05:00
Cody Soyland
415b4de110
Merge branch 'develop' into http-inversion-2 2018-06-13 21:38:30 -05:00
Cody Soyland
fba865fc6c Remove more net/http references 2018-06-13 16:50:44 -05:00
Travis Turner
fe167ea78c
un-export some top-level functions 2018-06-13 16:44:24 -05:00
Travis Turner
8021fc389b
un-export (some) Cluster methods 2018-06-13 15:42:35 -05:00
Cody Soyland
0b16a3afb9 Merge branch 'develop' into http-inversion 2018-06-12 14:49:54 -05:00
Cody Soyland
f2c104dfef Migrate HTTP handler and client into http subpackage. 2018-06-12 13:22:40 -05:00
Travis Turner
e58d407182
unexport (most) View methods 2018-06-07 22:50:49 -05:00
Travis Turner
cb7487e34d
change all instances of internal Frame to Field 2018-06-05 23:24:24 -05:00
Travis Turner
bbf3e529dc
GoRename Frame to Field in cluster.go 2018-06-05 22:42:21 -05:00
Travis Turner
9db359d34a
GoRename Frame to Field in holder.go 2018-06-05 22:36:19 -05:00
Travis Turner
3531c128c4
GoRename Frame to Field in index.go 2018-06-05 22:33:48 -05:00
Yuce Tekol
738dead374
Remove view from API, handler, docs 2018-05-30 16:22:15 +03:00
Matt Jaffee
47f7beaecc
WIP removing inverse 2018-05-25 17:18:38 -05:00
Matt Jaffee
c543831937
remove unused code
nodeByURI, deleteFrameFieldRequest, readColumnAttrSets, validOptions, defaultBody
2018-05-15 11:05:31 -05:00
Matt Jaffee
a3445ec884
simplify loops with append... in cluster.go 2018-05-15 10:48:40 -05:00
Matt Jaffee
1550279ebc
simplify some error returns
removes unnecessary if statements
2018-05-14 19:29:29 -05:00
Matt Jaffee
616545cd5c
remove input definition, add install-stringer to Makefile
also removes one line of unreachable code in cluster.go (unrelated)
2018-05-14 17:14:20 -05:00
alanbernstein
1e9252c1bb
Merge pull request #1257 from alanbernstein/wrap-errors-cluster
Wrap errors in cluster.go
2018-05-10 10:38:35 -05:00
Todd Gruben
a436d4d32a fixed deadlock in setcooridnator 2018-05-09 15:00:39 -05:00
Alan Bernstein
4452cd7260 Wrap errors in cluster.go 2018-05-08 18:29:04 -05:00
Todd Gruben
4a1d15ec9d missed a file on last commit 2018-05-04 10:48:57 -07:00
Todd Gruben
2ef78af0ca adjusted protection around cluster coordinator mutations 2018-05-04 10:48:57 -07:00
Matthew Jaffee
992c3e8bdd WIP - adding more locking to Cluster 2018-05-04 10:48:57 -07:00
Matthew Jaffee
f9ff20689a
remove holder.Peek, combine with HasData, move server logic
Server initializing happens more in NewServer than Open now - expecting to
continue this trend. goal was to remove remoteClient from Server (since it has a
defaultClient) as well, but we'll have to refactor the client usage in fragment
and frame first.
2018-04-24 08:44:58 -05:00
Matthew Jaffee
876ed56e30
move pilosa.Config to pilosa/server.Config
step 1 of #1203

The Config object is really just a specification of the options to pilosa
server, so it makes sense to have it in that package.
2018-04-19 14:51:42 -05:00
Travis Turner
0a8d573fb3
WIP: Remove SecurityManager. Implement api restrictions in api package. 2018-04-16 17:12:28 -05:00
Matthew Jaffee
3f303d1098
remove global defaults from config.go
these were occaisionally referenced elsewhere in the codebase - in all but one
case, there were workarounds that are actually better I think.

In the one case there wasn't I created a single top level DefaultConfig object
which is instantiated with all the default values and can be referred to if
necessary.

There was a bug in fragment.go with the way MaxWritesPerRequest was treated if
it was 0. Elsewhere, 0 meant no limit, but here, it would have caused a division
by 0.

Changed the default metrics provider from "nop" to "none", although "nop" will
still work. Previously, any value other than "statsd" or "expvar" was treated as
"nop", but I've changed this behavior to return an error if an invalid string is
provided. I think this is better behavior, because in the case that someone
bothered to change the default, they were probably interested in actually
getting stats, and might be annoyed when it silently failed.
2018-04-12 19:52:48 -05:00
Matthew Jaffee
04f5d5875c
api docs, rename funcs, refactor usage of internal
All exported funcs in api.go are now documented

Several poorly named methods of API and Cluster were renamed. Particularly, the
word Fragment was often changed to Slice in cases where it was really a slice
being specified and not a fragment.

several methods which received or returned internal data structures have been
refactored to be more opaque.

Deprecation logging was added to input definition methods.
2018-04-12 11:28:35 -05:00
Matthew Jaffee
f8cb579187
get tests passing 2018-04-09 14:29:43 -05:00
Travis Turner
9a2aeac6f8
Clean up logger; make it honor --log-path flag.
Add functional options to NewGossipMemberSet.
2018-03-27 08:40:04 -05:00
Travis Turner
2a462d5e42
make sure cluster.Nodes[].IsCoordinator values get updated. return old coordinator node in response. 2018-03-08 14:18:10 -06:00
Travis Turner
fa4e543e84
send a NodeJoin event on startup for cases where a quick restart has occurred and memberlist is not aware of it 2018-03-08 12:42:24 -06:00
Travis Turner
1cc45b22a2
Change Config.Coordinator from URI to bool 2018-03-08 12:42:24 -06:00
Cody Soyland
5a2e1c3703
Merge pull request #1162 from codysoyland/cluster-resize-remove-without-replicas
Proper error handling when attempting to remove node when there aren't enough replicas
2018-03-07 13:51:44 -06:00
Cody Soyland
42682e12a8 Address code review: Fix error handling and add comment 2018-03-07 09:45:27 -06:00
Cody Soyland
b7b92913d9 Add comment to listenForJoins 2018-03-06 15:13:24 -06:00
Cody Soyland
d28a30ebd4 Proper error handling when attempting to remove node when there aren't enough replicas 2018-03-06 15:11:46 -06:00
Travis Turner
d0009206b4
add comments to exported methods. remove debugging test. 2018-03-06 12:42:29 -06:00
Travis Turner
29dcfd06da
Merge pull request #1117 from travisturner/cluster-resize-handle-error
replace swallowed error with log entry
2018-02-23 16:37:42 -06:00