Commit graph

56 commits

Author SHA1 Message Date
Fletcher Haynes
da9b57bd45 Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
Fletcher Haynes
eb06bb50ae Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
Matt Jaffee
b67999215c
fix loop lint 2019-10-22 12:58:56 -05:00
Matt Jaffee
2651bfbd88
test and fix authentication of client certs btwn cluster nodes
This change should have been adding the "GetClientCertificate"
function in server/tlsconfig.go. This is in addition to the
GetCertificate func which is only used by servers. It ended up being
much more involved for a few reasons:

1. We had no way of passing a configured HTTP client into the
translate store stuff.

2. Our cluster tests assumed http, not HTTPS, and didn't have any way
to pass the necessary configuration in.

3. I encountered what turned out to be an unrelated bug in
cmd/server_test.go which is why I moved "close(m.Started)" in
server/server.go. Basically, I was running something on port 10111
which caused the test to fail (because it was trying to bind to that),
but the failure was not immediately caught during server startup
because the m.Started channel got closed which allowed the test code
to fall through to where it called m.Close() which then got a nil
pointer exception because m.Handler had never been set up.

4. Our test code was assuming that it could create clients that
ignored the config, which meant they didn't do TLS. I added an
InternalClient() method to pilosa.Server to expose the configured
client.
2019-10-18 15:17:35 -05:00
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Matt Jaffee
9e6662fb00
send POSTed schema to all nodes in cluster
also fix a *bunch* of tests that weren't closing the clusters they
created. Cleaned up one test to use t.Run instead of just checking
everything in a loop
2019-04-29 19:31:23 -05:00
Cody Soyland
7ede65bf80
Merge branch 'master' into shardwidth22 2019-04-11 10:10:47 -05:00
Matt Jaffee
d5cfe880f7
address race condition by getting cluster nodes with lock
needed an unlocked version of sendsync for use within the cluster, so also
implemented that. Added a number of tests trying to reproduce the issue, but was
not able to. Not sure it's worth keeping the new tests.
2019-04-05 15:40:24 -05:00
Matt Jaffee
836b467d3d
add support to modify shard width at build time
use "make <x> SHARD_WIDTH=nn"

fix tests to run and pass at different shardwidths

add shardwidth22 test to circle ci
2019-04-04 13:46:26 -05:00
Matt Jaffee
f1ecead069
fix failing tests due to staticcheck fixes 2019-01-21 14:38:58 -06:00
Travis Turner
d28170ddc6
Syncs AvailableShards when handling a ResizeInstruction.
There was a situation where availableShards on a new
node were not in sync with the cluster, so queries
following a resize were incorrect.
- Start a one-node cluster.
- Write data to shards 0 and 1
- Start a second node.
In the case where the hash algo was moving shard 0 to
node1, then node1 only knew about shard 0, so queries
to node1 would be incomplete.

This PR modifies the ResizeInstruction message to replace
`Schema` with `NodeStatus` (which contains both `Schema` and
`AvailableShards`). So now when a resize instruction is received,
the receiving node is able to sync its schema and availableShards.
2018-12-18 08:34:48 -06:00
Cody Soyland
c464e0fe64 Fix linter issues: gofmt 2018-07-16 16:45:42 -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
Travis Turner
50794bf63b
move fieldOptions unmarshal to the handler
validate fieldOptions in http package
2018-06-25 15:14:22 -05:00
Alan Bernstein
35526dd0d7 Update to new PQL syntax beyond the parser 2018-06-22 08:11:27 -05:00
Travis Turner
2a9b1e9e5b
final Frame to Field rename 2018-06-06 01:27:12 -05:00
Travis Turner
4c44c5f33a
fix Frame to Field in tests 2018-06-05 23:33:00 -05:00
Travis Turner
3531c128c4
GoRename Frame to Field in index.go 2018-06-05 22:33:48 -05:00
Travis Turner
1d3c4d6fcb
first pass at GoRename Frame to Field in frame.go 2018-06-05 17:52:22 -05:00
Todd Gruben
fb7bf11825 Bit -> Column migration 2018-05-23 15:05:22 -05:00
Travis Turner
12352e598f
increase cluster poll in tests from 2s to 10s 2018-05-17 15:55:11 -05:00
Travis Turner
e7e3e2def5
adjust cluster state tests so they aren't so dependent upon a sleep before checking state 2018-05-16 13:06:23 -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
Yuce Tekol
90464dc01a
Merged with master 2018-05-11 16:41:36 +03:00
Matthew Jaffee
992c3e8bdd WIP - adding more locking to Cluster 2018-05-04 10:48:57 -07:00
Yuce Tekol
878b55ec40
Removes /id and /hosts endpoints. Augments /status endpoint with the node local ID. 2018-05-01 13:04:49 +03:00
Matthew Jaffee
28acc29a10
refactoring pilosa/server
trying to separate internal an external concerns in pilosa.Server - it should
handle Cluster, Holder, etc. while pilosa/server handles things with external
deps - e.g. Logger, Stats, Handler, etc. Using functional options in
pilosa.Server now.
2018-04-23 13:35:39 -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
07610560df
Merge branch 'master' into 1151-http-refactor 2018-04-10 08:10:25 -05:00
Matthew Jaffee
f8cb579187
get tests passing 2018-04-09 14:29:43 -05:00
Travis Turner
1764d5a9bf
Merge pull request #1180 from travisturner/remove-rowcol-labels
Remove rowcol labels
2018-04-03 22:37:59 -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
b2b0fd081a
Remove ColumnLabel support 2018-03-26 15:35:56 -05:00
Travis Turner
2a8172b2a3
Remove RowLabel support 2018-03-26 14:48:56 -05:00
Travis Turner
0ca7cfe498
Change Seeds() to GetBindAddr() to clarify GossipMemberSet testing. 2018-03-23 16:34:19 -05:00
Travis Turner
1cc45b22a2
Change Config.Coordinator from URI to bool 2018-03-08 12:42:24 -06:00
Cody Soyland
42682e12a8 Address code review: Fix error handling and add comment 2018-03-07 09:45:27 -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
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
Cody Soyland
dbe917c9f4 Merge branch 'cluster-resize' into redundant-gossip-seeds 2018-02-23 09:20:28 -06:00
Cody Soyland
a23fe86839 Convert gossip seed string to slice 2018-02-22 13:14:45 -06:00
Travis Turner
52edeb72b4
add validation around node-remove conditions 2018-02-22 12:15:27 -06:00
Cody Soyland
fc6b0ea0e8 Add support for comma-separated list of gossip seeds for redundancy. 2018-02-22 11:45:50 -06:00
Travis Turner
666fe22ecb
replace swallowed error with log entry 2018-02-15 12:11:27 -06:00
Travis Turner
1085be6582
fix bug in NewServerCluster where each host was its own coordinator 2018-02-08 15:11:51 -06:00