Commit graph

322 commits

Author SHA1 Message Date
Matt Jaffee
9a453ef51a
expose worker pool size to config, so we can set it lower in tests
we are experiencing issues with CI where it fails with race: limit on
8128 simultaneously alive goroutines is exceeded, dying

this, despite the fact that closing the executor should clean up all
worker goroutines. Apparently in CircleCI runtime.NumCPU() reports 36,
so the goroutines added up quickly.
2019-07-15 14:25:40 -05:00
Matt Jaffee
a7d9b0a5ae
make sure workers are done when closing via a WaitGroup
still running out of goroutines in race tests in CI, so hopefully this
fixes that.
2019-07-15 08:36:22 -05:00
Matt Jaffee
7d7a5539ca
make executor work chan smaller, add executor.Close
the size of the work chan probably doesn't matter... there is some
discussion of this on the associated PR
https://github.com/pilosa/pilosa/pull/2034
may test with an unbuffered channel as well.

Closing the executor avoids leaking goroutines which seems to be an
issue while running the test suite.
2019-07-15 07:56:57 -05:00
Matt Jaffee
4e55a1fd73
add worker pool to executor for local query processing
Pilosa previously spawned a goroutine for each remote node that a
query needed to be forwarded to, and then forwarded a single request
containing all the shards that the query should operate on. It then
spawned a goroutine *per local shard* to process the query
locally. This was fine if there weren't too many shards, or too many
queries coming in concurrently, but we found that it created issues
when there were 100s or 1000s of shards per node, and dozens of
queries arriving concurrently.

Specifically, the memberlist "hiccup" issue is highly correlated with
many goroutine scenarios, and after applying this patch, memberlist
complaints in the logs were much decreased, and nodeLeave events under
concurrent query load almost entirely eliminated.

This patch creates a fixed size pool of goroutines to do local shard
processing, and passes work to them through a channel, one job per
query per shard. Handling of remote requests (forwarding queries) is
unchanged.

We set the pool size to NumCPU()+8 somewhat arbitrarily, but this
seemed to work pretty well in our testing on 32 core machines. It's a
pretty big improvement over launching a goroutine per shard per query
which is what we were doing previously, so we can tune it more later
if necessary.
2019-07-12 17:16:48 -05:00
Yuce Tekol
30036387cc
add remove at version 2.0 notices 2019-07-09 21:13:51 +03:00
Yuce Tekol
d6bb5c65de
Fixes #2009 2019-07-09 16:41:18 +03:00
Yuce Tekol
13a42d9c07
replaced min code with bmp.iterator 2019-06-11 16:58:32 +03:00
Yuce Tekol
b64a3e0c68
adds filter support to MinRow and MaxRow 2019-06-03 16:29:04 +03:00
Yuce Tekol
8be7bd6956
add tests for MinRow and MaxRow 2019-06-03 13:56:50 +03:00
Yuce Tekol
1379cbbcd6
remove unused code 2019-05-31 17:35:50 +03:00
Yuce Tekol
592a191aee
translate key into Pair only for MinRow, MaxRow 2019-05-31 17:21:44 +03:00
Yuce Tekol
dd728f28ed
remove unused code 2019-05-31 17:13:25 +03:00
Yuce Tekol
d2aca3bbfc
Added MinRow and MaxRow calls 2019-05-31 15:32:15 +03:00
Ben Johnson
dd4227f5e3
Improve TopN() errors
This commit improves field not found, integer field, and cache errors
for the `TopN()` command.
2019-05-25 15:16:45 -06:00
Ben Johnson
d4de122549
Add min/max constraints 2019-05-17 15:52:17 -06:00
Ben Johnson
7ed9fba335
Unbounded BSI w/ sign magnitude
This commit implements BSI with variable bit depth using a
sign magnitudeto indicate whether a value is positive or negative.
This also rearranges the existence bit to be the first bit instead
of the last bit.
2019-05-17 15:52:17 -06:00
Matt Jaffee
e185a01e67
add translation for groupby filter arg, improve test 2019-05-10 14:15:06 -05:00
Travis Turner
b46ff7b990
fix some lint warnings raised in VS-Code 2019-04-17 18:10:05 -05:00
Matt Jaffee
811f1b4124
move build-tagged shardwidth files to subpackage 2019-04-04 14:27:52 -05:00
Travis Turner
a0a641c541
remove extra nesting 2019-02-01 16:46:45 -06:00
Travis Turner
87b3438cb1
add logic to restrict time range to available views 2019-02-01 15:30:10 -06:00
Travis Turner
b544328647
parseTime() function to handle interface to time parsing 2019-01-31 18:29:32 -06:00
Travis Turner
a242b8cbaf
add from/to range arguments to Rows() 2019-01-30 16:27:07 -06:00
Travis Turner
30711664e8
ensure ClearRow() arguments get translated 2019-01-29 12:36:54 -06:00
Travis Turner
8fe966e8a0
Modifying some of the logic around Shift()
add some comments to the shift() logic
improve test coverage
fix full bitmap overflow
add support to specify shift-by amount
2019-01-25 12:54:44 -06:00
Travis Turner
2467d88ddc
Merge branch 'master' into shift-op 2019-01-24 13:56:28 -06:00
Matt Jaffee
bb9f3a95d2
move legacy field check to non-concurrent code 2019-01-21 15:17:33 -06:00
Matt Jaffee
20e06b7b0f
fix direct usage of std log instead of configured logger 2019-01-21 14:39:24 -06:00
Matt Jaffee
daa87d8e12
fix staticcheck warnings 2019-01-21 14:24:11 -06:00
Yuce Tekol
773d661b68
GroupBy legacy Rows 2019-01-21 18:02:51 +03:00
Yuce Tekol
ca7dc073ab
Merge branch 'master' into 1805-rows-call-format 2019-01-18 17:48:58 +03:00
Yuce Tekol
5fb82ac7b3
Rows sets _field if field is set 2019-01-18 17:46:20 +03:00
Yuce Tekol
c30f9bc192
Rows accepts a fields param for backward compat. 2019-01-18 17:41:54 +03:00
Matthew Jaffee
6f21eb32de
Apply suggestions from code review
Co-Authored-By: travisturner <travis@pilosa.com>
2019-01-17 14:47:35 -06:00
Yuce Tekol
dc735c17b8
Fixes #1805. Fixes Store call error messages 2019-01-16 20:52:33 +03:00
tgruben
e5df52836e
Merge branch 'master' into shift-op 2019-01-15 08:57:28 -06:00
Travis Turner
44f53a5f1d
raise an error on Rows() query against a time field with noStandardView:true 2019-01-14 16:14:45 -06:00
Yuce Tekol
9f6d489be8
fixes #1823. Updates tests and docs for row range 2019-01-14 14:39:08 +03:00
Ben Johnson
9d1e5ca8ce
Merge Range() into Row() call.
This commit refactors the `Range()` call and merges its functionality
into the `Row()` call.
2019-01-09 15:10:49 -07:00
Yuce Tekol
08b22da8c9
Merge branch 'master' into public-proto-remove-bit-add-fieldrow-rowkey 2019-01-03 15:48:09 +03:00
Yuce Tekol
65c30283d7
adds tests for GroupBy with keys; removes unused Bit message from proto 2019-01-03 15:20:02 +03:00
Matt Jaffee
5b14227e08
convert gotos to for loops 2019-01-02 14:32:59 -06:00
Todd Gruben
216fd0964a
a quicker empty check for group by 2019-01-02 14:32:59 -06:00
Matt Jaffee
aa0d64047d
add horrifying code to skip rows with count 0 in Group By 2019-01-02 14:32:59 -06:00
Matt Jaffee
81d08be044
fix PQL, Rows and Group By problems
make sure that args which are Uints are positive and return an error if not.

improve group by error messages if field for Rows query is invalid
2018-12-21 14:16:55 -06:00
Matt Jaffee
97eb94397f
fix Rows bug where Pilosa would crash without 'field' argument. 2018-12-21 11:55:25 -06:00
Ben Johnson
88c18ca1fe
Cancel queries on Context.Done()
This commit periodicially checks if the context has been cancelled
or if a deadline has been reached. If so, it returns a query-related
error message depending on the cause.
2018-12-12 16:55:44 -07:00
Matt Jaffee
8b3e5b998a
fix data race which appears to be unrelated to previous changes 2018-12-11 15:45:44 -06:00
Ben Johnson
727659644b
Add GroupBy filter. 2018-12-07 10:35:57 -07:00
tgruben
dc8f0a430b
Merge branch 'master' into shift-op 2018-11-26 11:55:57 -06:00