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. |
||
|---|---|---|
| .circleci | ||
| .github | ||
| api/client | ||
| boltdb | ||
| cmd | ||
| ctl | ||
| docs | ||
| encoding/proto | ||
| extensions | ||
| gcnotify | ||
| generator | ||
| gopsutil | ||
| gossip | ||
| http | ||
| internal | ||
| logger | ||
| lru | ||
| mock | ||
| pql | ||
| prometheus | ||
| proto | ||
| roaring | ||
| server | ||
| shardwidth | ||
| stats | ||
| statsd | ||
| syswrap | ||
| test | ||
| testdata | ||
| toml | ||
| tracing | ||
| .gitignore | ||
| .golangci.yml | ||
| api.go | ||
| api_test.go | ||
| apimethod_string.go | ||
| attr.go | ||
| attr_test.go | ||
| broadcast.go | ||
| cache.go | ||
| cache_test.go | ||
| CHANGELOG.md | ||
| client.go | ||
| cluster.go | ||
| cluster_internal_test.go | ||
| cmd.go | ||
| CONTRIBUTING.md | ||
| diagnostics.go | ||
| diagnostics_internal_test.go | ||
| doc.go | ||
| Dockerfile | ||
| Dockerfile-clustertests | ||
| event.go | ||
| executor.go | ||
| executor_internal_test.go | ||
| executor_test.go | ||
| extension.go | ||
| field.go | ||
| field_internal_test.go | ||
| field_test.go | ||
| fragment.go | ||
| fragment_internal_test.go | ||
| gc.go | ||
| gendebug_test.go | ||
| generation.go | ||
| generation_debug.go | ||
| generation_nodebug.go | ||
| generation_test.go | ||
| go.mod | ||
| go.sum | ||
| handler.go | ||
| holder.go | ||
| holder_internal_test.go | ||
| holder_test.go | ||
| index.go | ||
| index_internal_test.go | ||
| index_test.go | ||
| iterator.go | ||
| iterator_internal_test.go | ||
| LICENSE | ||
| license.exceptions | ||
| Makefile | ||
| metrics.go | ||
| mmap_test.go | ||
| NOTES | ||
| NOTICE | ||
| pilosa.go | ||
| pilosa_internal_test.go | ||
| pilosa_test.go | ||
| README.md | ||
| row.go | ||
| row_test.go | ||
| server.go | ||
| server_internal_test.go | ||
| snapshotqueue.go | ||
| time.go | ||
| time_internal_test.go | ||
| tracker.go | ||
| tracker_test.go | ||
| transaction.go | ||
| transaction.md | ||
| transaction_test.go | ||
| translate.go | ||
| translator_test.go | ||
| uri.go | ||
| uri_internal_test.go | ||
| utils_internal_test.go | ||
| version.go | ||
| view.go | ||
| view_internal_test.go | ||
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
-
Start Pilosa with the default configuration:
pilosa serverand verify that it's running:
curl localhost:10101/nodes -
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.