Commit graph

30 commits

Author SHA1 Message Date
Ben Johnson
8e49332b25 Add distributed tracing. 2018-11-21 15:08:33 -06:00
Cody Soyland
a962a0c526 Fix linter issues: deadcode 2018-07-17 17:17:42 -05:00
Cody Soyland
2635759893 Fix linter issues: misspell 2018-07-17 12:22:41 -05:00
Cody Soyland
7559382115 Unexport AttrBlocks 2018-07-05 23:11:56 -05:00
Matt Jaffee
7ec9c97e46
fixup nopAttrStore.
Methods no longer take pointer receiver, and NewNopAttrStore always returns a
reference to the same global object (which is no longer exported).
2018-07-02 08:30:48 -05:00
Matt Jaffee
d73ff9bfe2
collapse memAttrStore
memAttrStore is not used, but I opted to leave it in order to encourage its use
by future unit tests. Since it is unexported, however, and its fairly obvious
what it does, I didn't think the docstrings were adding much value, and it's more
readable in this compact form.
2018-06-29 08:12:20 -05:00
Travis Turner
7d91261968
un-export some package level constants 2018-06-13 17:18:52 -05:00
Travis Turner
6f4c50a4b5
move fragment_test into the pilosa package (internal) 2018-06-06 16:06:11 -05:00
Cody Soyland
f9efa6c579 Use type func(string) AttrStore in place of interface AttrStoreGenerator for simplicity 2018-03-23 13:57:29 -05:00
Travis Turner
b66bedd1ef
put BoltDB behind AttrStore interface 2018-03-19 11:30:41 -05:00
Todd Gruben
eca01e4b4f replace sha1 hash with faster xxhash 2018-02-06 08:51:38 -06:00
Cody Soyland
9dda9cbc2b Make a copy of returned attribute map for safety. 2017-07-12 15:47:17 -05:00
Cody Soyland
efda804851 Add mutex for attribute cache. Fixes #724. 2017-07-12 11:59:26 -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
Matt Jaffee
7ffeeeede3 fix duplicate case after rebase 2017-03-07 15:44:53 -06:00
Matt Jaffee
0202c9b849 add float support to proto format
floating point attrs are now fully supported
2017-03-07 15:40:50 -06:00
Todd Gruben
631b3bc44c added handling for float attribute 2017-02-01 16:29:48 -05:00
Ben Johnson
c6e2b1294b Add time-based frames and Range() support. 2016-12-08 12:29:49 -07: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
1126e7b5f7 optimize bulk bitmap attribute update
This commit adds a fast path for optimizing queries that only
have `SetBitmapAttrs()` calls in them. It does this by grouping
the calls into a single Bolt transaction and also by merging
multiple attribute updates per ID into one update.
2016-06-22 20:04:49 -06:00
Ben Johnson
26fd00ff3e add 'pilosactl bench' command
This commit adds a simple benchmarking utility to the `pilosactl`
binary. It currently only supports individual `SetBit()` commands
but it's a good start towards making a generic benchmarking
framework at the integration level.

The subcommands and usage/help messages were also cleaned up to
output correctly.
2016-03-31 15:49:57 -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
Todd Gruben
5862f714b3 removed debugging code' 2016-02-17 13:23:30 -06:00
Ben Johnson
b68c1caea0 fix int64 attr 2016-02-17 10:59:17 -07:00
Todd Gruben
4394a97db8 changed protobuf to uint; doesn't work 2016-02-17 11:06:57 -06: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