Commit graph

5199 commits

Author SHA1 Message Date
Matt Jaffee
fba496bc91
generalize test strings and break out old UnmarshalBinary code
(don't use iterator for unmarshalBinary)
2019-08-05 17:39:47 -05:00
Travis Turner
a5aa6e48a5
Merge pull request #2050 from travisturner/bsi-base-value
Default BSI base value to min, max, or 0 depending on the min/max range
2019-07-31 13:06:51 -05:00
Travis Turner
96e6c11897
add bsiBase() helper function to avoid duplication 2019-07-31 12:43:05 -05:00
Travis Turner
9e9103d98f
apply default base logic to BSI v1 migration code 2019-07-31 11:38:36 -05:00
Travis Turner
c5140ba88d
default BSI base value to min, max, or 0 depending on the min/max range 2019-07-31 09:19:04 -05:00
Travis Turner
a0560a0405
Merge pull request #2048 from travisturner/ingest-worker-pool
Add a worker pool for importRoaring jobs
2019-07-26 13:41:22 -05:00
Travis Turner
1af4219c62
Merge branch 'master' into ingest-worker-pool 2019-07-26 13:24:01 -05:00
Matthew Jaffee
c1f8216b3a
Merge pull request #2041 from pilosa/uip-time-only
use union in place when computing time ranges to avoid excessive allocation
2019-07-26 13:05:23 -05:00
seebs
e8bade6174
Merge branch 'master' into uip-time-only 2019-07-26 12:30:10 -05:00
Travis Turner
e044712675
add close() method to api 2019-07-26 11:34:29 -05:00
Seebs
1d732e4b7f drop unused functions from previous unmarshal implementation 2019-07-25 16:11:57 -05:00
Seebs
2d9ca0888f Use work queue for opening/closing fragments
When starting up, we can have a large number of views, each
with some number of fragments, and by default these were being
opened sequentially. There's no real benefit to that; they're
all nicely independent from each other and don't need much
locking, so we implement a trivial semaphore and launch the
operations asynchronously. We also combine them into
errgroups.

Similarly, we do this for fields and views, capping the number
of fields (or views) opened in parallel to avoid hitting a
system-wide limit on threads created (oops). Note that the
limits are shared, not multiplicative; we cap this fairly
arbitrarily at 8 fields being opened, and 16 views being opened,
at a time, but NumCPU*2 fragments being opened by those views.

This dramatically increases CPU load during startup, but doesn't
seem to significantly increase total CPU time, it just scales
much better on machines with lots of cores.
2019-07-25 16:03:24 -05:00
Seebs
b04037900c move to using roaring iterators for UnmarshalBinary
The new roaring iterator used for the remap and importroaring
things could also be used for unmarshalling roaring streams,
and it's a slightly simpler design that doesn't need two passes
through the data. This patch cleans that up a bit, makes it work
better with ops logs, and uses that instead. It appears to
noticably but not immensely reduce the time imports take, but it
also gets us back down to one thing parsing roaring formats.

There are a couple of subtle changes to errors we were testing
for in various tests, and one of the fuzz tests goes away because
it was actually itself an erroneous error message -- it was reporting
the header of a roaring file as an invalid op because the op log
reader was running on the header for roaring files with zero
containers. Oops.
2019-07-25 16:03:18 -05:00
Seebs
29a1db4550 add "holder" command to start up and shut down
It would be neat to be able to observe performance of
"just open the holder". So let's make that a verb.
2019-07-25 15:38:38 -05:00
Ashley Svetlik
e028640ba2
Merge pull request #2045 from asvetlik/pdk2
Updated PDK
2019-07-25 15:33:58 -05:00
Travis Turner
ea29759774
adds a worker pool for importRoaring jobs 2019-07-25 11:41:47 -05:00
Matt Jaffee
5b655418b1
add another single day query test 2019-07-25 08:12:19 -05:00
Matt Jaffee
2c311e685e
add bounds check when getting time rows 2019-07-25 08:12:19 -05:00
Seebs
ff153459ee
union many things at once to cut down allocations 2019-07-25 08:12:19 -05:00
Ashley Svetlik
ae4d86e69a
Merge branch 'master' into pdk2 2019-07-24 16:45:05 -05:00
Ashley Svetlik
7320eeac4d
Merge pull request #2046 from asvetlik/admin2
Updated Open File Limit in Administration Doc
2019-07-24 16:02:00 -05:00
Ashley Svetlik
e45d03687b Improved wording in text and table 2019-07-24 10:49:47 -05:00
Ashley Svetlik
6e6c591f62 Added max url links 2019-07-24 10:41:54 -05:00
Ashley Svetlik
27e62c40cf Improved Open File Limit section wording 2019-07-24 10:22:09 -05:00
Ashley Svetlik
be218fd963 Updated Open File Limit Section 2019-07-24 09:38:06 -05:00
Ashley Svetlik
6d58db4fc9 Updated Pilosa Schema table and added pdk repo link 2019-07-24 09:32:18 -05:00
Matthew Jaffee
bd00f1bfe2
Merge pull request #2034 from jaffee/worker-pool
Worker pool
2019-07-15 14:48:39 -05:00
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
Matt Jaffee
ec09582f44
get read lock only where possible in Holder 2019-07-12 13:36:56 -05:00
Yuce Tekol
430b8a6118
Merge pull request #2033 from yuce/fixes-2009
Fixes #2009
2019-07-09 21:27:10 +03:00
Yuce Tekol
30036387cc
add remove at version 2.0 notices 2019-07-09 21:13:51 +03:00
Yuce Tekol
bc0098ccbe
Merge branch 'master' into fixes-2009 2019-07-09 21:11:43 +03:00
Yuce Tekol
6e6efc3d96
Merge pull request #2032 from yuce/fix-min-max-row-pb-result
fixes #2031
2019-07-09 16:50:07 +03:00
Yuce Tekol
d6bb5c65de
Fixes #2009 2019-07-09 16:41:18 +03:00
Yuce Tekol
150c2a0cfa
fixes #2031 2019-07-09 12:25:18 +03:00
asvetlik
c2cbaddba8
Merge pull request #2028 from asvetlik/master
Getting Started Update
2019-07-03 15:34:06 -05:00
asvetlik
42a1d851cb
Merge branch 'master' into master 2019-07-03 15:06:58 -05:00
Matthew Jaffee
8b2e257171
Merge pull request #2029 from jaffee/disable-tracing
add ability to disable tracing and use nopTracer
2019-07-03 15:02:54 -05:00
Ashley Svetlik
c6e840ea30 Fixed jq note link 2019-07-03 14:12:11 -05:00
Ashley Svetlik
2db061ac21 Reformatted Schema Check 2019-07-03 14:02:00 -05:00
Ashley Svetlik
daad23b388 Made review chnages 2019-07-03 13:52:18 -05:00
Matt Jaffee
efd424ebab
add ability to disable tracing and use nopTracer
Have found some potential performance or stability issues associated
with lots of mutex blocking in getting a parent span's context. Want
the ability to totally disable tracing to help debugging.
2019-07-03 11:02:59 -05:00
Ashley Svetlik
614bcff1e0 Deleted redundant paragraph in Sample Project 2019-07-03 08:12:58 -05:00
Ashley Svetlik
e38983782c Fixed Schema check note 2019-07-02 15:35:07 -05:00
Ashley Svetlik
f991df206c Made Schema check into note 2019-07-02 15:24:56 -05:00
Ashley Svetlik
36c75ea416 Removed Note before schema check 2019-07-02 15:21:16 -05:00
Ashley Svetlik
f40958fd5a Improved documentation wording 2019-07-02 11:27:27 -05:00