Commit graph

75 commits

Author SHA1 Message Date
Todd Gruben
65b19168b3 add test for bitcount test on remove 2017-06-19 10:38:47 -05:00
Ben Johnson
ca29f7692b
Fix failing tests when IPv6 is disabled.
Turning off IPv6 causes the tests to fail because the Go
`net.Listen()` function obtains a `[::]` address when using
a `localhost:0` bind address. Looking through the Go source
code, I don't see a good way to fix that.

This change adds a test flag to allow users to specify the
network name when running the test:

```sh
go test github.com/pilosa/pilosa/server -network tcp4
```
2017-06-01 14:43:59 -06:00
Todd Gruben
542d748baf corrected tests to no longer use String method 2017-06-01 10:17:49 -05:00
Todd Gruben
7382428f38 clensed String method;added documentation for tests 2017-05-31 15:01:48 -05:00
Todd Gruben
649e58253a corrected flip prefix;changed flip to inclusive 2017-05-31 13:58:54 -05:00
Todd Gruben
a6975192d6 Merge branch 'flip' of github.com:tgruben/pilosa into flip 2017-05-31 10:55:31 -05:00
Todd Gruben
aa13bbb6ce cleaned up comments 2017-05-31 10:40:52 -05:00
tgruben
a58206bb4d Merge branch 'master' into flip 2017-05-31 08:43:50 -05:00
Todd Gruben
1c468fb38e bitmap container xor empty test 2017-05-30 15:07:10 -05:00
Todd Gruben
b5bd8433cc added empty and equivlence testing 2017-05-30 13:27:11 -05:00
Todd Gruben
aa713e3832 add support for bit flip (negate) in roaring 2017-05-25 10:07:29 -05:00
Todd Gruben
2182534cc7 added xor support to roaring 2017-05-22 16:51:53 -05:00
Travis
ea4bf0a1d3
Fix roaring test: TestBitmap_Quick_Array1
When the random number generator was coming up 0,
then `a = []uint64{}`. This caused the bitmap `bm` to be empty.
In this case, `bm.Slice()` is a nil slice, while the expected
slice is an empty slice (i.e. they are not considered equal):
got: ([]uint64) <nil>
exp: ([]uint64) {}
2017-04-29 18:04:59 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Cody Soyland
5206461d51 Migrate from Umbel to Pilosa organization on Github 2016-11-28 15:21:11 -06:00
Todd Gruben
6a8973f7c9 fix for intersect and updated tests 2016-09-22 16:47:39 -05:00
Ben Johnson
39ed7de5c4 Optimize IntersectionCount for Array+Bitmap
Reworks the `roaring.intersectionCountArrayBitmap()` call to avoid
using an iterator. Performance of the included benchmark went from
2.5ms to 1.1ms.

Some of the issue with intersectionCount is the increased size of
bitmaps and slices and I need to do additional testing with various
sizes.
2016-09-07 10:13:31 -06:00
Ben Johnson
08659c350b optimize intersection count
This commit moves the computation of the intersection count to
the `roaring` package so that no allocations are required. The
implementation operates at the roaring container level and has
specialized functions for array-array, array-bitmap, and
bitmap-bitmap container pairs.
2016-06-02 16:03:21 -06:00
Ben Johnson
de698aa03e consensus block merge
This commit refactors the anti-entropy system to fetch data from
all replicated blocks and only set/clear bits which deviate from
the consensus between all blocks.

An example of this is if 3 nodes had the following bits set for
a single bitmap:

	Node A: 1 2 3
	Node B:   2   4
	Node C: 1 2   4

Then only bits which are set on a majority will be set. In this
case bits 1, 2, & 4 are set but 3 only exists on a single node.

The node performing the merge would then determine the following
set/clear diffs for each node:

	Node A: clear(3), set(4)
	Node B: set(1)
	Node C: none

Once the merge is performed and all nodes receive their diff
instructions then the nodes will be in sync:

	Node A: 1 2 4
	Node B: 1 2 4
	Node C: 1 2 4

There still exists situations where bits can be reset. If Node A
is up and Node B & C are down then Node A's bits will be reset
once B & C come back online. We should add write consistency
settings for incoming writes so that we can ensure that a quorum
is written to before returning a success. This is outside the
scope of this commit though.
2016-05-06 16:19:10 -06:00
Ben Johnson
8f4d7d50c3 active anti-entropy
This commit adds active anti-entropy via a merkle tree structure.
2016-04-12 19:48:32 -06:00
Ben Johnson
569bafdc7d add bulk call support to the query endpoint
This commit changes the `pql.Query` so that it can accept one or more
top-level calls instead of only one.

The query request format change because a query with a single call is
still valid. However, the result format now returns a `results` field
that has one result for each top-level call. The `profiles` field is
still the same, however, it combines all profiles from all bitmap
responses into one return so that there's not duplicate attributes.

Fixes #59
2016-03-08 14:34:37 -07:00
Ben Johnson
039ca1d91b fix roaring array append
This commit fixes a bug where appends to an array container did
not cause it to roll over to a bitmap container when it reached
the max array size.
2016-01-09 12:27:20 -07:00
Ben Johnson
bc11f36862 support uint64 in roaring bitmaps
This commit refactors the roaring bitmaps to use uint64 values
instead of uint32 values. This is required for the size of
values we need in pilosa.

This change is not backwards compatible with the previous data
format so any existing data directories need to be removed before
using this code.
2016-01-07 13:43:57 -07:00
Ben Johnson
bc2e94a654 fix roaring bitmap mapping flag
This commit properly sets the `mapped` flag on a roaring bitmap
container so that it can be unmapped when it's changed.
2015-12-16 13:20:18 -07:00
Ben Johnson
be34c8d970 add delta roaring bitmap
This commit adds an implementation of roaring bitmaps that can be
used with mmap files and also allow for delta changes that are
appended to the end of the file as a write-head log.
2015-12-15 20:07:46 -07:00