Commit graph

49 commits

Author SHA1 Message Date
Seebs
7d1fde7438 drop anti-entropy feature, since it doesn't work
The anti-entropy feature has never actually worked. We've been
talking about removing it or replacing it for ages, but haven't
had a concrete motivation.

But the anti-entropy interface is the sole user of several components
of the Tx interface, and now that we're trying to replace that
interface, being able to drop those components has some appeal, so
let's remove the one thing that used them, in the hopes that this
will simplify life.

This also lets us drop ForEach and ForEachRange, which were
barely used at all. The one surviving usage (CSV export) can be
handled by using the container iterator we already have, and
making ContainerCallback exported so we can use it to just call
things for every bit.

(cherry picked from commit fff9ddc1f5)
2022-11-15 11:31:13 -08:00
Seebs
e47bdb7889 cleaned up sync from private repo 2022-09-30 11:20:58 -07:00
Seebs
f6d17b1b58 refactor testing to share clusters more often
When doing tests, we create a ton of one-off clusters. This
turns out to be expensive and slow. Fixing it is surprisingly hard.

Fundamentally: If we're sharing clusters, we need to use different
indexes for each test, to avoid clashes. This changes index names.
As a side-effect, this reorders many partition-based things, like
the order keys are returned in. Thus, to fix this, we change a lot
of tests to no longer depend on the *order* in which strings are
returned.

Having done that, we can also discard the ModHasher behavior, since
that only existed to allow us to reliably predict partitioning.

The basic design is as follows: Instead of a cluster being a
[]*Command, a "shareable" cluster is now a []*Command plus some
flags, and a "cluster" is a pointer to a possibly-shared cluster,
plus a link to the specific test using this specific cluster,
and correspondingly, its test name suitably coerced to be a valid
index name prefix.

The "test.Cluster" object now has methods to allow retrieving an
index name, and also implemnts fmt.Formatter to let you use,
e.g., `%i` with it in Sprintf to get "the index name, plus an i".
(This works for everything but %p and %T.)

This allows us to consistently rework all the many things that
use index names in a persistent way.

We also have `MustUnshared` and `MustRunUnsharedCluster` methods
which allow us to specify that a given test needs its own cluster
for some reason. For instance, the tests that want to run backups
need their own isolated cluster, and the tests that want to close
or reopen nodes need their own cluster because a reopened cluster
won't have working GRPC for some reason.

On "closing" a shared cluster (actually the test-specific wrapper
that reflects a given sharing), we delete any indexes starting with
that test's index name prefix. Otherwise, the huge pile of open
indexes prevents `go test -race` from working on MacOS, where we
run out of address space too quickly.

This is fairly enormous but most of the individual changes are
fairly trivial things like replacing the string "i" with "c.Idx()".

We also tweaked a test that failed for me a couple of times to
not depend on sort order.
2022-09-30 11:10:47 -07:00
CLoZengineer
f9ddb5d5c1
fix: updating code to meet linting requirements (#2171)
* removes unused filesize function

* removes ioutil usage

* updates ioutil.ReadAll to io.ReadAll

* updates ioutil.TempFile to os.CreateTemp

* updates ioutil.TempDir to os.MkdirTemp

* updates ioutil.ReadAll to os.ReadAll

* update ioutil.WriteFile to os.WriteFile

* updates ioutil.Discard to io.Discard

* updates ioutil.ReadDir to os.ReadDir where applicable

* removes unused code in idk

* creates type to use for context value keys

* replaces assert.Nil with assert.NoError for error checks
2022-09-29 12:34:29 -04: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
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Todd Gruben
5ddbe0b51a Merge branch 'confirm-fail' of github.com:tgruben/pilosa into confirm-fail 2019-06-05 14:54:08 -05:00
Todd Gruben
c99071d5bf timeout handleded incorrectly;added tests 2019-06-05 14:53:35 -05:00
Seebs
449c853850 address meta-lint or half-baked lint fixes
Clean up some spelling and consistency issues for the lint
fixes.
2019-04-16 12:08:40 -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
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
fe7b926773
make sure more tests and benchmarks can have their temp dir set by flag
This is to allow the directory to be set to where a particular disk is mounted
during benchmarking.
2019-01-21 16:23:27 -06:00
Matt Jaffee
deae8ce7c0
improvements to clustertests and fix cluster pause bug by state sharing 2018-11-09 11:28:19 -06: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
c133c53d0d
add missing word in test fail message 2018-08-20 10:39:41 -05:00
Matt Jaffee
e16c43c3bc
Merge branch 'master' into 1492-ae-and-resize 2018-08-20 09:13:35 -05:00
Travis Turner
ceaf97de60
add translate tests to ensure that adding/removing replica nodes behaves as expected 2018-08-13 11:06:16 -05:00
Matt Jaffee
287ea370fd
add cluster tests for anti entropy abort 2018-08-08 15:11:52 -05:00
Matt Jaffee
0e467e5492
rename cluster.nodes and fix race in API 2018-08-08 15:11:39 -05:00
Cody Soyland
a962a0c526 Fix linter issues: deadcode 2018-07-17 17:17:42 -05:00
Cody Soyland
c464e0fe64 Fix linter issues: gofmt 2018-07-16 16:45:42 -05:00
Cody Soyland
9c160ee65e Unexport Topology.NodeIDs 2018-07-05 23:11:56 -05:00
Matt Jaffee
0a94d2f10d
Merge branch 'develop' into core-structs 2018-07-05 16:38:14 -05:00
Matt Jaffee
cd8c63c125
tests passing 2018-07-04 21:43:18 -05:00
Travis Turner
44f0b992f6
change all CreateField() methods to take functional options instead of FieldOptions 2018-07-04 21:22:35 -05:00
Matt Jaffee
f78af41565
unexport cluster's newhasher func 2018-07-02 17:25:21 -05:00
Matt Jaffee
4182678d5a
work on unexporting View stuff 2018-07-02 10:11:56 -05:00
Matt Jaffee
3be609ed10
unexport newCluster and some other stuff 2018-07-02 09:10:09 -05:00
Matt Jaffee
7801b81b10
unexport cluster (gorename) 2018-07-02 07:56:51 -05:00
Travis Turner
5dd7a9556a
rename slice to shard 2018-06-28 14:07:07 -05:00
Matt Jaffee
648cfe7ad0
unexport Cluster fields which could be automatically unexported 2018-06-27 15:39:12 -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
Travis Turner
b7470ba8a8
Merge branch 'develop' into remove-view-argument 2018-06-19 19:50:03 -05:00
Travis Turner
c77b7d5ca5
remove view argument from Field.SetBit and Field.ClearBit 2018-06-19 18:15:38 -05:00
Travis Turner
ca6b3b5524
simplify test cluter addNode signature 2018-06-19 17:48:37 -05:00
Todd Gruben
eb43707d19 cleanup 2018-06-19 13:34:44 -05:00
Travis Turner
8021fc389b
un-export (some) Cluster methods 2018-06-13 15:42:35 -05:00
Travis Turner
2a9b1e9e5b
final Frame to Field rename 2018-06-06 01:27:12 -05:00
Travis Turner
bbf3e529dc
GoRename Frame to Field in cluster.go 2018-06-05 22:42:21 -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
Alan Bernstein
4452cd7260 Wrap errors in cluster.go 2018-05-08 18:29:04 -05:00
Travis Turner
1cc45b22a2
Change Config.Coordinator from URI to bool 2018-03-08 12:42:24 -06:00
Travis Turner
216ba7a41e
Use NodeID instead of URI for node identification 2018-02-02 15:58:46 -06:00
Travis Turner
a98b862fca
add /cluster/resize/remove-node endpoint 2017-11-27 11:06:02 -06:00
Travis Turner
f4b0729458
Rename structs and funcs.
NodeSet -> MemberSet
URISet -> NodeSet
AddNode -> AddNodeBasicSorted
AddHost -> AddNode
2017-10-30 13:03:55 -05:00
Travis Turner
a8871ada6a
Convert Host to URI.
Fix all compile errors.
2017-10-25 11:52:55 -05:00
Travis
f1e3ac90d4
Determine cluster membership via gossip.
Handle resize cluster events.
Add Toplogy support.
Refactor FrameOptions.
Add tests.
2017-10-25 00:27:30 -05:00