Commit graph

316 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
Matt Jaffee
07f8f5b8e0
fix concurrent field creation race condition 2019-09-23 07:54:01 -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
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
Matt Jaffee
7d7a5539ca
make executor work chan smaller, add executor.Close
the size of the work chan probably doesn't matter... there is some
discussion of this on the associated PR
https://github.com/pilosa/pilosa/pull/2034
may test with an unbuffered channel as well.

Closing the executor avoids leaking goroutines which seems to be an
issue while running the test suite.
2019-07-15 07:56:57 -05:00
Matt Jaffee
3a07abdeae
remove shard validation stuff
it seems to have a bug where there is some race on cluster startup
which can cause it to think that the node doesn't own any shards.
2019-04-22 17:36:40 -05:00
Travis Turner
b46ff7b990
fix some lint warnings raised in VS-Code 2019-04-17 18:10:05 -05:00
Seebs
77d49ded64 so much lint
So with the switch to a new linter, we get a lot of new warnings,
and the majority of them are harmless probably, but a few might be
real. Variously just use _ to suppress warnings, or report errors.
There's probably things here that deserve better fixes, but we can
always revisit it.
2019-04-16 12:07:18 -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
Todd Gruben
186f034b16
missed commit 2019-03-20 22:04:20 -05:00
Todd Gruben
38de65eac0
only load shards that are applicable to node 2019-03-20 22:04:19 -05:00
Matt Jaffee
daa87d8e12
fix staticcheck warnings 2019-01-21 14:24:11 -06:00
Matt Jaffee
af26473f77
disable anti-entropy if not using replication (there will never be anything to sync) 2019-01-07 16:52:43 -06:00
Ben Johnson
8e49332b25 Add distributed tracing. 2018-11-21 15:08:33 -06:00
Matt Jaffee
5458eb1656
fix holder.opened race with absurd lockedChan 2018-11-20 14:21:36 -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
8cd53bf2c2
Revert "msg type stringer"
This reverts commit dd4685d43b.
2018-11-09 11:34:32 -06:00
Matt Jaffee
dd4685d43b
msg type stringer 2018-11-09 11:28:53 -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
Todd Gruben
c0a3b7a781 fmt 2018-10-17 12:35:00 -05:00
Todd Gruben
9bb372a09e Merge branch 'fix-logger' of github.com:tgruben/pilosa into fix-logger 2018-10-17 11:12:57 -05:00
Todd Gruben
e5e2237fc0 changed order of logger options 2018-10-17 11:12:37 -05:00
tgruben
96e7107870
Merge branch 'master' into fix-logger 2018-10-17 10:52:51 -05:00
Todd Gruben
0df193cf98 revert to existing api with panic per jaffee 2018-10-17 10:29:58 -05:00
Ben Johnson
f8608227d1
Add DeleteAvailableShard()
This commit adds the ability to remove an 'available shard'
from the shard cache. This does not affect shards known to be
available because of local data.
2018-10-17 08:50:06 -06:00
tgruben
1895233ed8
Merge branch 'master' into fix-logger 2018-10-11 06:58:17 -05:00
Todd Gruben
85ebaf298d removed logging from translate store replaced with error 2018-10-01 11:04:47 -05:00
Yuce Tekol
2830fb46e6
Adds diagnostics CPUArch field 2018-10-01 15:31:13 +03:00
Cody Soyland
2521922d7b Properly wrap translation store errors, decrease test map size to prevent failure on 32-bit 2018-09-25 11:35:58 -05:00
Travis Turner
cdfcd6db5e
store remoteAvailableShards to file 2018-09-24 15:37:43 -05:00
Travis Turner
1039390686
fixes pass-by-value issue in proto decode 2018-09-24 13:11:54 -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
Ben Johnson
f4c9c0fed3
Maintain available shards set.
This commit removes the previous `MaxShard` tracking and replaces
it with an `Available Shards` set tracking. This allows sparse shard
tracking without implicitly tracking all shards in between.
2018-08-22 07:57:58 -06:00
Matt Jaffee
e16c43c3bc
Merge branch 'master' into 1492-ae-and-resize 2018-08-20 09:13:35 -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
Matt Jaffee
ab63c8e7b6
add forgotten server changes which support AE test 2018-08-09 16:07:05 -05:00
Matt Jaffee
0e467e5492
rename cluster.nodes and fix race in API 2018-08-08 15:11:39 -05:00
Matt Jaffee
16eff6de8c
prevent anti entropy and cluster resize from running simultaneously 2018-08-08 14:41:54 -05:00
Travis Turner
f9a265f94d
fix places where empty IndexOptions were being used 2018-07-23 17:23:54 -05:00
Cody Soyland
187ded0a52 Fix linter issues: maligned 2018-07-19 11:07:59 -05:00
Matt Jaffee
64c3dae4d7
fix error message handler->holder 2018-07-10 16:40:45 -05:00