Commit graph

205 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
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
e844e1ad75
Translation store refactor 2019-10-09 08:59:41 -06:00
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Cody Soyland
be91ee2103 Copy dependency into project and use pilosa's logger 2019-10-03 09:44:48 -05:00
Cody Soyland
4324059325 Auto-reload TLS certificates on SIGHUP 2019-10-02 17:10:32 -05:00
Cody Soyland
8e06bb5ff3 return error instead of fatal 2019-09-25 15:15:33 -05:00
Cody Soyland
0ec9d3b7e6 Add support for TLS client certificate verification and custom CA 2019-09-24 11:09:58 -05:00
seebs
484c51b6e0
Merge branch 'master' into startupspeed 2019-08-07 11:32:56 -05:00
Travis Turner
e044712675
add close() method to api 2019-07-26 11:34:29 -05:00
Seebs
29a1db4550 add "holder" command to start up and shut down
It would be neat to be able to observe performance of
"just open the holder". So let's make that a verb.
2019-07-25 15:38:38 -05:00
Travis Turner
ea29759774
adds a worker pool for importRoaring jobs 2019-07-25 11:41:47 -05:00
Matt Jaffee
9a453ef51a
expose worker pool size to config, so we can set it lower in tests
we are experiencing issues with CI where it fails with race: limit on
8128 simultaneously alive goroutines is exceeded, dying

this, despite the fact that closing the executor should clean up all
worker goroutines. Apparently in CircleCI runtime.NumCPU() reports 36,
so the goroutines added up quickly.
2019-07-15 14:25:40 -05:00
Cody Soyland
4c7aa4af81
Add Prometheus stats client with Count support 2019-06-05 21:23:11 -05:00
Matt Jaffee
599b2f4a9e
implement config options for block profile rate and mutex fraction
set sane defaults. The performance overhead seems to be negligible, and this will allow us to obtain mutex and blocking profiles from running Pilosas by default.
2019-03-25 11:38:01 -05:00
Matt Jaffee
e7f65cf7be
implement global open file counter using syswrap
close files after using them if global max is passed.

I originally implemented this without the global count—just always closing files
when done with them, and reopening for new writes. This was crazy slow for that
one test that uses mustSetBits in a big loop. I modified the test to use
importRoaring and everything worked better (though much more slowly).

After adding the global counter, I ran the tests with that one test using
mustSetBits again, and the performance was similar to master. After completing
this PR, I ran the tests with the max limit set to 5—they still passed but were
much slower.
2019-03-23 14:52:16 -05:00
Matt Jaffee
226f15446b
lock MaxMapCount and fix unused var 2019-03-19 12:55:26 -05:00
Matt Jaffee
e469285fe3
add fragment mmap tracking and limiting
in the case that the map limit is reached, we'll fall back to reading the file
into memory normally.
2019-03-19 12:55:26 -05:00
Travis Turner
efb9f97e61
Advertise address and listen on 0.0.0.0
This commit adds support for advertise address by using a new config
option `advertise`, or by defaulting its value to that
specified in `bind`.

Also adds support for listening on 0.0.0.0 by trying to determine
the preferred outbound IP to use for the advertise address.
2019-01-21 22:36:55 -06:00
Matt Jaffee
6f4dee5e31
pass loggers around properly in gossip 2019-01-21 14:47:02 -06:00
Cody Soyland
f0c6394c61 Use syscall.Dup3 on ARM64 as Dup2 is unsupported 2018-11-27 11:03:59 -06:00
Ben Johnson
8e49332b25 Add distributed tracing. 2018-11-21 15:08:33 -06:00
Matt Jaffee
77598c2cc6
dup log output onto stderr to catch panics in log file 2018-11-20 14:08:07 -06:00
Matt Jaffee
65f478470f
logging cleanup - start with lowercase unless reporting error or warning 2018-11-20 14:08:06 -06:00
Seebs
a203313143 move Logger and Stats to their own packages
I'd like to add stat tracking to Roaring, which means it
has to be able to import the stats package, which means
stats has to be a package rather than part of the pilosa
package. If stats stops being in pilosa, it still needs
a way to import logger, so logger also has to leave the
pilosa package. Then everything using them needs to import
them and use package selectors on their names.

This doesn't actually add the stats support to roaring,
it just makes it so there's a way to import the stats
code from something in the roaring package.
2018-11-15 15:10:44 -06:00
Matt Jaffee
90c5f64b19
filter memberlist debug and info logs, use t.Log instead of fmt in cluster tests 2018-11-12 14:01:57 -06:00
Matt Jaffee
deae8ce7c0
improvements to clustertests and fix cluster pause bug by state sharing 2018-11-09 11:28:19 -06:00
Matt Jaffee
ec3982c0ff
pull out advertise URI changes 2018-11-02 16:10:39 -05:00
Matt Jaffee
8db7a78a93
unpushed WIP on cluster-tests 2018-10-23 11:10:24 -05:00
Travis Turner
42531f72fb
prevent closing os.Stdout or os.Stderr (used in verbose test logging) 2018-10-17 17:59:57 -05:00
Cody Soyland
52ba336461 Address code review feedback 2018-09-20 16:05:28 -05:00
Cody Soyland
7a32745b28 Make translate map size configurable. 2018-09-19 12:35:00 -05:00
Travis Turner
d50a0e853c
change NewTranslateStore() to take an interface for backward compatibility 2018-08-13 12:04:22 -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
Cody Soyland
dc50204846 Fix linter issues: unconvert 2018-07-20 11:51:55 -05:00
Cody Soyland
0b86bbb4f5 Fix linter issues: gochecknoinits 2018-07-18 11:58:27 -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
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
21cf6b6e57
remove URI getters since the fields were exported for serialization 2018-07-05 17:59:18 -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
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
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