Commit graph

55 commits

Author SHA1 Message Date
Travis
40b27b6643
Fix panic when iterating over an empty run container.
When the difference of two run containers resulted in an empty
container, that container would be a run container with no runs.
The Iterator was expected there to be at least on run in
`container.runs`. This fix protects against that and adds tests
for that case.
2017-09-27 15:11:16 -05:00
Todd Gruben
3f3cc60531
micro optimization to bitmap difference 2017-09-27 11:17:15 -05:00
Matthew Jaffee
f6b75e0361
fix Bitmap.CountRange bugs, comment, test 2017-08-15 17:07:15 -05:00
Travis
8f3cb3e761
add a comment to TestBitmap_BitmapCountRangeEdgeCase 2017-08-10 08:46:13 -05:00
Todd Gruben
5d39bc0b1c addressing concerns 2017-08-09 15:34:59 -05:00
Todd Gruben
93257af5d2 CountRange was incorrect if rangekey was prior to inital container 2017-08-09 14:06:22 -05:00
Todd Gruben
a3f3ca3c5a fixed overflow in interval16 runlen; added rle tests 2017-08-01 16:25:11 -05:00
Todd Gruben
d7272f46a2 converted containers to 16bit 2017-07-27 13:00:14 -05:00
Travis Turner
023c7fa18f Merge pull request #672 from travisturner/roaring-intersect-tests
Roaring intersect tests
2017-06-23 10:39:45 -05:00
Travis
c8ef6fde89
test edge case (end exclusive) in arrayCountRange for range [start, end) 2017-06-23 10:24:43 -05:00
Travis Turner
987f7ca3bf Merge pull request #674 from travisturner/fix-differencearrayrun-logic
bug fix in `differenceArrayRun` logic.
2017-06-22 16:26:09 -05:00
Todd Gruben
c6bf1bc55f Merge branch '334-rle-rebased' of github.com:pilosa/pilosa into 334-rle-rebased 2017-06-22 16:21:23 -05:00
Todd Gruben
b14a31dab3 fixed bug with xor; extended test coverage for xor 2017-06-22 16:21:19 -05:00
Travis
fc6898a933
remove a test that was not testing the correct thing 2017-06-22 16:07:21 -05:00
Travis
8fd752ddb1
bug fix in differenceArrayRun logic. add more test coverage for differenceArrayRun 2017-06-22 16:03:20 -05:00
Travis
1e0a529b4e
improve coverage in intersect** operations 2017-06-22 14:01:55 -05:00
Travis
087c78a0df
add test coverage for CountRange operations 2017-06-22 14:01:42 -05:00
Travis Turner
4b1f2efe08 Merge pull request #671 from travisturner/intersectioncount-tests
Improves test coverage for `IntersectionCount` operations
2017-06-22 12:28:36 -05:00
Travis
10490a3402
Improves test coverage for IntersectionCount operations 2017-06-22 11:03:05 -05:00
Todd Gruben
188a4aa8d9 extended bitmap contains test coverage 2017-06-22 10:58:47 -05:00
Travis Turner
79482769b3 Merge pull request #669 from travisturner/fix-array-run-transitions
Standardize the default iterator val for j to -1 for both arrays and runs
2017-06-21 16:01:52 -05:00
Travis
a387deefb1
Test the case where last and first bits of adjoining containers are set. 2017-06-21 09:20:54 -05:00
Todd Gruben
0508a3c31f fixed bug in difference;added more roaring test coverage 2017-06-20 18:19:58 -05:00
Travis
eeaabff7fe
Standardize the default iterator value for j to -1 for both arrays and runs 2017-06-20 16:46:40 -05:00
Todd Gruben
8822362772 extending roaring test coverage 2017-06-20 08:22:45 -05:00
Todd Gruben
432e95a4e8 added test for bitmap.clone() 2017-06-19 10:43:06 -05:00
Todd Gruben
02cba542e8 bug in CountRange 2017-06-19 10:43:06 -05:00
Alan Bernstein
ea59de4234 Update check function for run containers, add tests 2017-06-19 10:43:05 -05:00
Alan Bernstein
76a05d38b5 Add test TODO comments 2017-06-19 10:40:00 -05:00
Todd Gruben
6609120464 replaced linear search with binary search in run container 2017-06-19 10:40:00 -05:00
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