There existed a case where two goroutines would try to CreateIfNotExists the same fragment, and the first would create it, but not put it in the fragments table, then drop the lock, try to broadcast a message, and if it succeeded then populate the fragments table. The second would come along during the broadcast, not find an entry, try to create one, and fail because the file was already locked. Basic problem: At least one test in server/ will fail if we don't delay to send out broadcast messages. Everything will lock up if we can wait forever (or even just a very long time) for the message broadcast. We don't ever want to have an inconsistent state -- so we don't want to either fail to get a fragment when one's been created, or get one that's about to be deleted if the broadcast fails. So, creation and stashing in the fragments table is atomic and immediate. After that, we optimistically attempt to broadcast. If we fail, we fail. We delay up to about 50ms for the broadcast to be done, but after that return anyway. This way, if things are going well everything works, and if there's unexpected delays, things work except some nodes in a cluster may not know about available shards on other nodes sometimes. But that would have happened anyway. A proper fix is beyond the scope of this patch. |
||
|---|---|---|
| .circleci | ||
| .github | ||
| boltdb | ||
| cmd | ||
| ctl | ||
| docs | ||
| encoding/proto | ||
| enterprise | ||
| gcnotify | ||
| gopsutil | ||
| gossip | ||
| http | ||
| inmem | ||
| internal | ||
| logger | ||
| lru | ||
| mock | ||
| pql | ||
| roaring | ||
| server | ||
| stats | ||
| statsd | ||
| test | ||
| testdata/sample_view | ||
| toml | ||
| tracing | ||
| .gitignore | ||
| 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 | ||
| field.go | ||
| field_internal_test.go | ||
| field_test.go | ||
| fragment.go | ||
| fragment_internal_test.go | ||
| gc.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 | ||
| Makefile | ||
| NOTES | ||
| NOTICE | ||
| pilosa.go | ||
| pilosa_internal_test.go | ||
| pilosa_test.go | ||
| README.md | ||
| row.go | ||
| row_test.go | ||
| server.go | ||
| server_internal_test.go | ||
| time.go | ||
| time_internal_test.go | ||
| translate.go | ||
| translate_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:
Licenses
The core Pilosa code base and all default builds (referred to as Pilosa Community Edition) are licensed completely under the Apache License, Version 2.0.
If you build Pilosa with the enterprise build tag (Pilosa Enterprise Edition), then that build will include features licensed under the GNU Affero General
Public License (AGPL). Enterprise code is located entirely in the github.com/pilosa/pilosa/enterprise
directory. See github.com/pilosa/pilosa/NOTICE and
github.com/pilosa/pilosa/LICENSE for more information about Pilosa licenses.
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.