No description
Find a file
Seebs e833f6c47e
various cluster test fixups/cleanups
Some cluster tests failed sporadically. In order to fix them, I
introduced some debugging-related functionality, which revealed
several new bugs that were actually existing bugs we just happened
not to hit in testing. This combines various fixes.

We start with "make the nodes used in testing have distinct names
based on the test case name", which lets us discover that we are
leaking clusters, which continue to sit around talking with each
other. That in turn causes significantly higher load on access to
ephemeral ports, which causes sporadic failures when we shut a
node down and try to restart it, but something else has gotten assigned
its ephemeral port number since then.

Part of the fix is to try to rebind on port 0 if an attempt to
bind to a specified port over 32k fails. This is a guess; the
actual ephemeral port range could be 16k+, 32k+, or 48k+, or just
about anything else really, but it seems reasonable in
practice.

There were bugs in the oft-repeated loops to await the cluster
achieving a given state, and it could hang forever if it didn't,
so we add a timeout and a standard function on the test.Cluster
type to handle that. Note that the timeout seems irrelevant; in
every case I've tried, a timeout of 0 is fine because the node
start doesn't complete until the cluster state has changed.

Add a method to test.Command to run a query, expecting a specific
result. Also clean up some of the formatting and generation of
queries, and allow parameterized (badly) queries. This lets us fix
a subtle bug, which is that test cases were depending on assumptions
about shardwidths. Also improve the diagnostic output from some of
these functions so test failures are more comprehensible.

But actually that dependency on shardwidths was ALSO revealing a
genuine underlying bug, which is that a node resize did not correctly
propagate the schema to a new node if there was no data present
on shards that node would own. We now also have a test case that
hits that (or would, if we hadn't fixed it).

Add comments explaining the server options parameters for MustNewCluster
and MustRunCluster.

Also, we implement the ReadFrom and WriteTo behaviors for
InMemTranslateStore, without which some of the cluster resize tests
fail. Props to the comment for specifically stating that they wouldn't
work if that happened, which probably saved me several hours of
debugging. The implementations may not be robust, but
InMemTranslateStore is intended to be used only in lightweight
and transient testing.
2020-07-23 11:15:18 -05:00
.circleci Fix/refactor CircleCI config 2020-06-24 13:45:17 -05:00
.github Add changelog steps to PR template 2019-04-12 13:47:40 -05:00
api/client add QueryUnary to the grpc client api 2020-04-17 16:12:10 -05:00
boltdb alter tests to allow for shardwidth22 2020-04-02 17:32:49 -05:00
cmd shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
ctl shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
docs Add comments warning that Shift() is unsupported 2020-06-15 17:16:00 -05:00
encoding/proto Pass Schema in ClusterStatus message 2020-06-03 13:26:16 +02:00
extensions stop using pkg/plugin, start using build tags 2019-12-20 12:21:47 -06:00
gcnotify v2.0.0 2019-10-08 14:56:17 -06:00
generator Address TODOs in roaring tests 2020-05-21 13:28:54 -05:00
gopsutil fix CPU speed on non-Intel platforms 2020-06-08 11:40:53 -04:00
gossip Rename etag to createdAt 2020-06-03 13:26:16 +02:00
http shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
internal Pass Schema in ClusterStatus message 2020-06-03 13:26:16 +02:00
logger tidy up some of the TODO comments 2020-05-09 22:26:12 -05:00
lru so much lint 2019-04-16 12:07:18 -05:00
mock tidy up some of the TODO comments 2020-05-09 22:26:12 -05:00
pql modify PQL parser to handle escapes in string values 2020-05-29 07:58:50 -05:00
prometheus Revert "Add tags to MaxRow metric" 2020-04-10 20:59:19 -05:00
proto ToTable and ToRows interface for gRPC 2020-04-16 14:16:54 -05:00
roaring thaw frozen containers for runRunInPlace test 2020-07-09 14:15:21 -05:00
server various cluster test fixups/cleanups 2020-07-23 11:15:18 -05:00
shardwidth Fix enterprise license header and add shardwidth files to license header check 2019-04-12 11:57:28 -05:00
stats Remove old metric from tests 2020-04-10 20:59:19 -05:00
statsd v2.0.0 2019-10-08 14:56:17 -06:00
syswrap avoid race on max count reads and writes 2020-02-21 16:38:36 -06:00
test various cluster test fixups/cleanups 2020-07-23 11:15:18 -05:00
testdata fix Clear() returning false when clearing a bit with no time views 2020-06-19 08:51:08 -04:00
toml Add license headers to files missing them and CI check to verify they are present. Fixes #1633 2019-04-12 11:30:41 -05:00
tracing add trivial execution-time profiling 2019-10-29 15:23:37 -05:00
.gitignore Hide build directory in .gitignore 2017-05-19 14:17:57 -05:00
.golangci.yml fix golangci-lint complaints 2019-11-10 17:58:46 -06:00
api.go shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
api_test.go pilosa: remove unused field code 2020-06-26 10:14:56 -04:00
apimethod_string.go add FieldValue call 2020-05-06 11:52:27 -05:00
attr.go v2.0.0 2019-10-08 14:56:17 -06:00
attr_test.go v2.0.0 2019-10-08 14:56:17 -06:00
broadcast.go implement transaction API layer and intra-cluster messaging 2020-04-20 13:30:48 -05:00
cache.go remove allocations from ranked cache when possible 2020-06-26 12:12:51 -04:00
cache_test.go Fix ranked cache logic to support reducing cached values below 2019-11-18 11:39:50 -06:00
CHANGELOG.md Fix typo 2019-09-17 16:01:21 -05:00
client.go tidy up some of the TODO comments 2020-05-09 22:26:12 -05:00
cluster.go various cluster test fixups/cleanups 2020-07-23 11:15:18 -05:00
cluster_internal_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
cmd.go Copy dependency into project and use pilosa's logger 2019-10-03 09:44:48 -05:00
CONTRIBUTING.md simplify contributing instructions by removing weird upstream thing 2019-05-01 17:37:52 -05:00
diagnostics.go support for decimal fields 2019-10-29 16:36:14 -05:00
diagnostics_internal_test.go v2.0.0 2019-10-08 14:56:17 -06:00
doc.go Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Dockerfile Bind to public interface in docker image 2020-04-28 14:20:22 -05:00
Dockerfile-clustertests Run "go mod vendor" outside of Docker so authenticated modules may use system credentials 2019-12-20 12:21:47 -06:00
event.go fix some lint warnings raised in VS-Code 2019-04-17 18:10:05 -05:00
executor.go Address the overflow issue with values outside the int64 range 2020-07-01 20:40:47 +02:00
executor_internal_test.go Address the overflow issue with values outside the int64 range 2020-07-01 20:40:47 +02:00
executor_test.go FieldValue - check if column arg exists 2020-07-01 11:36:42 +02:00
extension.go stop using pkg/plugin, start using build tags 2019-12-20 12:21:47 -06:00
field.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
field_internal_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
field_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
fragment.go fix oversized rangeEQ 2020-07-23 10:59:50 -04:00
fragment_internal_test.go fix oversized rangeEQ 2020-07-23 10:59:50 -04:00
gc.go fix some lint warnings raised in VS-Code 2019-04-17 18:10:05 -05:00
gendebug_test.go generation testing and paranoia features 2020-02-21 16:38:35 -06:00
generation.go track retries correctly in truncation case 2020-06-29 15:13:51 -04:00
generation_debug.go Sources and Generations: tracking mmapped files 2019-11-12 12:14:29 -06:00
generation_nodebug.go Sources and Generations: tracking mmapped files 2019-11-12 12:14:29 -06:00
generation_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
go.mod Copy reopen.FileWriter into pilosa 2020-04-20 11:58:09 -05:00
go.sum Copy reopen.FileWriter into pilosa 2020-04-20 11:58:09 -05:00
handler.go shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
holder.go remove unnecesary slice operation when processing holder 2020-06-29 15:22:27 -04:00
holder_internal_test.go shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
holder_test.go add a test for the "clears" bug 2020-05-01 16:15:42 -05:00
index.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
index_internal_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
index_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
iterator.go v2.0.0 2019-10-08 14:56:17 -06:00
iterator_internal_test.go rename internal_tests. fix license header 2018-07-04 10:59:08 -05:00
LICENSE Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
license.exceptions Remove a few more enterprise references 2020-06-26 15:57:21 -05:00
Makefile set version to match Molecula convention 2020-06-26 17:41:19 -04:00
metrics.go add metrics for transactions 2020-05-26 17:51:28 -04:00
mmap_test.go make mmap test experiment with different amounts of mapping 2020-02-21 16:38:35 -06:00
NOTES rename slice to shard 2018-06-28 14:07:07 -05:00
NOTICE Remove a few more enterprise references 2020-06-26 15:57:21 -05:00
pilosa.go FieldValue - check if column arg exists 2020-07-01 11:36:42 +02:00
pilosa_internal_test.go allow field and index names up to 230 characters 2020-01-09 13:02:22 -06:00
pilosa_test.go v2.0.0 2019-10-08 14:56:17 -06:00
README.md Remove a few more enterprise references 2020-06-26 15:57:21 -05:00
row.go Add comments warning that Shift() is unsupported 2020-06-15 17:16:00 -05:00
row_test.go fix differenceInPlace test 2020-01-30 13:38:31 -06:00
server.go shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
server_internal_test.go remove shard validation stuff 2019-04-22 17:36:40 -05:00
snapshotqueue.go shared/generic functionality for iterating holders 2020-06-29 15:18:47 -04:00
time.go add logic to restrict time range to available views 2019-02-01 15:30:10 -06:00
time_internal_test.go add logic to restrict time range to available views 2019-02-01 15:30:10 -06:00
tracker.go track active queries 2020-06-04 10:50:15 -04:00
tracker_test.go add unit test to active query tracker 2020-06-04 14:05:06 -04:00
transaction.go tidy up some of the TODO comments 2020-05-09 22:26:12 -05:00
transaction.md correction to endpoint 2020-05-28 15:36:00 -05:00
transaction_test.go TestTransactionManager: raise transaction timeouts to avoid sporadic failures 2020-06-29 13:44:20 -04:00
translate.go various cluster test fixups/cleanups 2020-07-23 11:15:18 -05:00
translator_test.go forward field translation request to coordinator 2020-03-05 14:54:23 -06:00
uri.go Translation store refactor 2019-10-09 08:59:41 -06:00
uri_internal_test.go Require a valid port that isn't greater than 65,535 2018-08-16 21:05:41 -04:00
utils_internal_test.go unexport availableShardFileFlushDuration 2020-04-05 18:37:11 -05:00
version.go rebrand pilosa binaries 2020-06-26 16:49:05 -04:00
view.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00
view_internal_test.go thread the holder through things, and improve snapshot queue logic 2020-06-29 15:13:50 -04:00

CircleCI GoDoc Go Report Card license CLA Assistant GitHub release

An open source, distributed bitmap index.

Want to contribute? One of the easiest ways is to tell us how you're using (or want to use) Pilosa. We learn from every discussion!

Docs

See our Documentation for information about installing and working with Pilosa.

Getting Started

  1. Install Pilosa.

  2. Start Pilosa with the default configuration:

    pilosa server
    

    and verify that it's running:

    curl localhost:10101/nodes
    
  3. Follow along with the Sample Project to get a better understanding of Pilosa's capabilities.

Data Model

Check out how the Pilosa Data Model works.

Query Language

You can interact with Pilosa directly in the console using the Pilosa Query Language (PQL).

Client Libraries

There are supported libraries for the following languages:

License

Pilosa is licensed under the Apache License, Version 2.0.

A copy of the license is located in github.com/pilosa/pilosa/LICENSE. More details about licensing are found in github.com/pilosa/pilosa/NOTICE.

Get Support

There are several channels available for you to reach out to us for support.

Contributing

Pilosa is an open source project. Please see our Contributing Guide for information about how to get involved.