Commit graph

47 commits

Author SHA1 Message Date
Matthew Jaffee
6d4c1d9db1
Sup 294 pre sort command (#2209)
* first cut at pre-sort command that works on ndjson

* finish pre_sort command for CSV and JSON and add test

* try fixing golangci-lint

* remove some dumb lint checks

* more linter disabling

* take .golangci.yml from previous repo

* go fmt (facepalm)

* remove ioutil to fix lint
2023-01-23 12:26:38 -06:00
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
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Matt Jaffee
9f4a9421bc
fix missing quote in toml tag. unclear how test could pass without it 2019-03-25 12:16:24 -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
Cody Soyland
2394d36108 Adjust tests, fix 32-bit config 2018-09-19 13:30:22 -05:00
Cody Soyland
526bdae280 Remove unneccessary t.Skip() 2018-06-21 15:41:34 -05:00
Cody Soyland
c6db3974bc WIP API refactor 2018-06-21 13:51:31 -05: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
9085c03ce8
Changes configuration cluster.type (string) to cluster.disabled (bool) 2018-02-08 12:40:46 -06:00
Travis Turner
d2d0756f4a
Define default config values for pilosa server in NewConfig rather than
flags. Based on work done in #885.
2017-12-15 15:07:02 -06:00
Travis Turner
c9886b049b
Merge branch 'master' into cluster-resize working branch. 2017-12-04 22:18:57 -06:00
Cody Soyland
e9a2534af7 Document undocumented flags and add tests (Fixes #915). 2017-11-08 13:12:51 -06:00
Cody Soyland
8c0d1ece55 Remove "plugins.path" configuration option
According to Todd, the current plugin direction is static and there is no need for dynamic loading, so this option is no longer needed.
2017-11-08 11:46:23 -06:00
Travis Turner
2bd0677df9
Remove MaxSlice polling.
Add Schema to proto.
Update MaxSlices in proto to include both standard and inverse.
Update LocalStatus (shared in gossip) to include MaxSlices and Schema.
Encode InputDefinitions with Index.

TODO:
- make sure InputDefinitions are considered in LocalStatus merge.
- decide what to do about `/slices/max` endpoint. client.backup is using
  it.
2017-10-26 23:48:40 -05:00
Yuce Tekol
2c5a8d9125
Fixed Merge branch 'master' into tls-support-URI
# Conflicts:
#	cmd/server_test.go
2017-10-12 16:03:32 +03:00
Yuce Tekol
5fbd701f34
updated tests 2017-10-10 06:26:19 +03:00
Yuce Tekol
8e10bc80a0
fix(?) TestServerConfig 2017-10-04 16:17:23 +03:00
Travis
a3b1b2ee1a
DefaultClusterType = ClusterGossip
This commit removes the `httpbroadcast` NodeSet, sets the default cluster type
to `gossip`, and uses the `static` cluster type for most test cases.
2017-08-07 08:25:35 -05:00
Michael Baird
4b53ec1f9c const cluster types, and more validation tests 2017-07-11 14:17:06 -05:00
Linh Vo
6a50427629 rename Config's fields 2017-07-10 13:34:10 -05:00
Linh Vo
95166fd0ee revert config and fix json tag 2017-07-10 11:28:32 -05:00
Linh Vo
e3090cb0c3 update doc for configuration 2017-07-07 15:12:16 -05:00
Ben Johnson
ca29f7692b
Fix failing tests when IPv6 is disabled.
Turning off IPv6 causes the tests to fail because the Go
`net.Listen()` function obtains a `[::]` address when using
a `localhost:0` bind address. Looking through the Go source
code, I don't see a good way to fix that.

This change adds a test flag to allow users to specify the
network name when running the test:

```sh
go test github.com/pilosa/pilosa/server -network tcp4
```
2017-06-01 14:43:59 -06:00
Michael Baird
ee159b455d Merge remote-tracking branch 'origin/master' into metrics
Conflicts:
	.gitignore
	cluster.go
	frame.go
	glide.lock
	index.go
2017-05-01 10:41:04 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Michael Baird
465f9806c6 fix server tests to bind to new node if changing the node set 2017-04-19 16:52:49 -05:00
Travis
4c8e46e17f change Config.Nodes to Config.Hosts 2017-04-19 10:37:00 -05:00
Travis
cebca697b1 fixing tests that were affected by the messenger/view merge 2017-04-19 10:24:41 -05:00
Yuce Tekol
2a87c6783a Check log file size > 0 2017-04-05 19:10:41 +03:00
Yuce Tekol
63aadd9b5e Simplified log path test 2017-04-05 18:26:55 +03:00
Yuce Tekol
5353448a92 Adds log-path config 2017-04-05 16:09:43 +03:00
Matt Jaffee
74b79dd928 add tests for subcommands 2017-03-17 16:43:04 -05:00
Matt Jaffee
dcafca3141 bind to localhost:0 in tests to avoid binding to the same port 2017-03-17 16:43:04 -05:00
Matt Jaffee
601e8478da put all cmd test helpers in root_test and return errors from them 2017-03-17 16:43:04 -05:00
Matt Jaffee
241649fc22 rename cmd.Serve->cmd.Server (gorename) 2017-03-17 16:43:04 -05:00
Matt Jaffee
60c1828dc9 nest profiling options in config file and test 2017-03-17 16:43:04 -05:00
Matt Jaffee
442380f8ab add anti-entropy interval arg 2017-03-17 16:43:04 -05:00
Matt Jaffee
b291307dde add plugins path arg to server
also fix an issue where tests would hang if an invalid config file was given
2017-03-17 16:43:04 -05:00
Matt Jaffee
9a18fc11a6 support cluster poll interval arg 2017-03-17 16:43:04 -05:00
Matt Jaffee
03eae77604 add cluster.hosts flag
had to work around a bunch of viper nonsense with handling string slices

changed the validator.Check to use reflect.DeepEqual

fixed a bug where env vars need to be reset between tests

had to change the structure of pilosa.config to enable the passing of hosts as a
slice of strings (it was a slice of structs which each just contained the string
host.) so we lose some generality, but we weren't using it anyway.
2017-03-17 16:43:04 -05:00
Matt Jaffee
2af42eedb5 add replicaN to pilosa server and test 2017-03-17 16:43:04 -05:00
Matt Jaffee
372b7ca1c4 full testing support for pilosa server
1. fixed a couple bugs with config file reading.
2. made cmd.Serve a global variable so tests could inspect it.
3. added table style testing for pilosa server
4. added the ability to stop server programmatically which also causes the cobra
command running it to return.
2017-03-17 16:43:04 -05:00
Matt Jaffee
076cc0960a add some proof of concept command tests 2017-03-17 16:43:04 -05:00