Commit graph

10 commits

Author SHA1 Message Date
Matt Jaffee
60dee04ed1
move pilosa/test/attr.go into pilosa/attr_test.go 2018-06-18 12:52:58 -05:00
Cody Soyland
85b1a73b73 Refactor test utilities into importable package.
Remove duplicate instances of test utilities from pilosa.ctl.
Now subpackages such as pilosa.ctl may import test utilities.
2017-06-23 09:10:15 -05:00
Ben Johnson
1c09af132e
Check for duplicate attributes under read lock on insert.
Changes the behavior of `AttrStore.SetAttrs()` to first verify
that the attributes haven't changed using a read-only lock before
obtaining a write lock to update the attributes.

Since the write lock serializes access, the previous insert time
sufferred lock contention when inserting a lot of duplicate
attributes. With the `RWMutex`, reads can be done in parallel so
multiple requests don't block each other.

Below is a simple benchmark showing the performance at 1, 5, & 10
goroutines:

	BenchmarkAttrStore_Duplicate          100000      137120 ns/op      8428 B/op       76 allocs/op
	BenchmarkAttrStore_Duplicate-5        100000      417459 ns/op      8431 B/op       76 allocs/op
	BenchmarkAttrStore_Duplicate-10       100000      139466 ns/op      8433 B/op       76 allocs/op

	BenchmarkAttrStore_Duplicate        20000000         703 ns/op       368 B/op        5 allocs/op
	BenchmarkAttrStore_Duplicate-5      100000000        213 ns/op       368 B/op        5 allocs/op
	BenchmarkAttrStore_Duplicate-10     100000000        223 ns/op       368 B/op        5 allocs/op
2017-05-19 07:35:50 -06:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Ben Johnson
d34687121f
Rename bitmap/profile to row/column. 2017-04-21 21:23:24 -06:00
Matt Jaffee
6f443f447a add signed int support
this affects the scanner/parser and makes it produce signed ints rather than
uints, and so it affects all code that is expecting unsighed ints to come out of
the parser.
2017-04-18 12:50:26 -05:00
Cody Soyland
5206461d51 Migrate from Umbel to Pilosa organization on Github 2016-11-28 15:21:11 -06:00
Ben Johnson
d5ad5fbb05 Add profile & bitmap attribute anti-entropy.
Adds block-based anti-entropy for the attribute stores and hooks
into the existing `IndexSyncer` to regulate frequency of syncs.
2016-09-30 11:47:43 -06:00
Ben Johnson
cca8970019 add Range() support
This commit adds support for setting bits in time-based frames.
2016-02-23 14:53:03 -07:00
Ben Johnson
f0fa03da83 refactor attribute stores
This commit refactors the profile and bitmap attribute stores so
that they share the same code. There is a new `AttrStore` which
associates key/value pairs with a `uint64` identifier.

The previous JSON encoding has been fixed to use protobufs which
fixes encoding issues for int64.
2016-02-16 13:41:37 -07:00