Commit graph

8896 commits

Author SHA1 Message Date
tgruben
d75e6888fc
Merge pull request #1918 from molecula/sup-146
[SUP-146] roaring-migrate bug;performance improvements
2022-02-14 15:08:26 -06:00
Todd Gruben
6c512359a1 missed a fmt statement 2022-02-14 14:53:47 -06:00
Todd Gruben
cbc9bf71a1 logging 2022-02-14 14:41:22 -06:00
Todd Gruben
d4b7d0cb57 Merge branch 'sup-146' of github.com:molecula/featurebase into sup-146 2022-02-14 14:09:13 -06:00
Todd Gruben
8a48c1b67a standard logger 2022-02-14 14:09:05 -06:00
tgruben
baa3a7793f
Merge branch 'master' into sup-146 2022-02-14 13:47:00 -06:00
Kasey C. Rodgers
956c37ec85
Merge pull request #1919 from molecula/fb1163-etcd-source-of-truth
make etcd schema primary source of truth for indexes and fields
2022-02-14 11:01:55 -08:00
tgruben
33451254e6
Merge branch 'master' into sup-146 2022-02-14 12:28:20 -06:00
Kasey C. Rodgers
ede8cf61a0
Merge branch 'master' into fb1163-etcd-source-of-truth 2022-02-14 10:28:10 -08:00
tgruben
c4eebc6885
Update cmd/roaring-migrate/main.go
Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
2022-02-14 12:17:55 -06:00
tgruben
89598a7788
Update cmd/roaring-migrate/main.go
Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
2022-02-14 12:17:42 -06:00
tgruben
e1e968ef97
Update cmd/roaring-migrate/main.go
Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
2022-02-14 12:17:24 -06:00
Todd Gruben
7e25ca467a Merge branch 'sup-146' of github.com:molecula/featurebase into sup-146 2022-02-14 12:12:30 -06:00
Todd Gruben
9bc28091c9 better testing 2022-02-14 12:11:28 -06:00
kcrodgers24
d57050d966 requested idx == nil fix; add doc comment 2022-02-14 10:09:33 -08:00
seebs
a98546c086
Merge pull request #1906 from molecula/task
improve task pool and give it some testing
2022-02-14 11:34:34 -06:00
kcrodgers24
7013910158 give each test its own InMemSchemator 2022-02-14 09:15:23 -08:00
Seebs
96ab9314d1 use task pool for executor workers
This adopts the task pool functionality to let us spawn new worker
threads when worker threads are blocked. The underlying reason for
this is the same as the reason for the previous worker-pool-growing
strategy; while our design persistently has at least one thing which
can proceed, it can be the case that there are N things blocked,
where N is the size of our worker pool. Blocked workers shouldn't
count against our desired number of workers.

Originally, the intent was to thread this into RBF, and provide
backpressure from RBF on the pool when blocking on writes. Unfortunately,
that's not good enough, because while a write is blocked, the Qcx
calling it is *also* holding the Qcx's mutex, which means that any other
NewTx on that Qcx will *also* block. So we need to block for the
entire time of the NewTx.

Removing the existing worker spawning code resulted in a subtle
and maybe-harmless change; prior to this, each invocation of `mapperLocal`
would hold a lock, which meant that all the tasks for a given local mapper
would be put in the queue *sequentially*, ensuring that they'd all be
picked up by workers before things from later workers.

With the new pushback, that's not, strictly, necessary. Also, if you
disable it, you can end up with 300,000 goroutines at once, most of them
blocked.

A smallish run does, in fact, eventually complete anyway -- it will
indeed keep making workers until everything gets one. However, while
it's *correct*, it's also noticably *slower*. The same test workload
goes from around 33 seconds to a bit over 40 seconds when that lock
isn't present. (But that's with an extremely small WAL write cap
introduced to make the previous deadlock possible.)

With large numbers of shards, the practical impact is that you can
have quite a lot of things in process, with hundreds of goroutines
each, all blocked waiting for one writer. If we force them to all be
processed at the same time, all the reads that are connected to
each other are much more likely to get all processed at once, before
something new comes along.

In short, that lock isn't strictly necessary but it seems to help
noticably with performance and reduce simultaneous goroutines
significantly.
2022-02-14 09:56:20 -06:00
Seebs
ff091b0346 implement a task pool
This implements a task pool which can handle backpressure; the
idea is, you have a target number of workers, but when a worker
blocks, you can tell it that it's blocking, and it can spawn
another worker in the mean time. This reduces the bounding provided
by the worker pool, and can significantly overshoot the intended size
of the pool in some cases, but it provides quick scaling up when
part of a workload gets blocked.

There's also a simulator attached to it. The simulator's job is
to act similarly to the executor's worker pool working on RBF
databases, including the weird semantics of writes and reads;
specifically, that reads aren't blocked by writes, but a write
can't terminate until every read that started before it has exited.
(This is an oversimplification; actually, writes can complete,
but they still hold the write lock until any WAL merge completes,
and the WAL merge can't complete until old reads are done.)

The simulator is significantly more complicated than the pool.
2022-02-14 09:56:19 -06:00
tgruben
e963bccc93
Merge branch 'master' into sup-146 2022-02-14 08:16:37 -06:00
Matthew Jaffee
40eff84e25
Merge pull request #1920 from molecula/coverage-permission-denied
try to clean up some files that are causing CI heartburn
2022-02-11 17:32:55 -06:00
Matthew Jaffee
490ad7f08a try to clean up some files that are causing CI heartburn 2022-02-11 16:59:11 -06:00
Matthew Jaffee
7a0025f417
Merge pull request #1911 from molecula/max-memory-extract-only
[SUP-143] Restrict max-memory setting to Extract() only
2022-02-11 14:47:24 -06:00
Ben Johnson
6d06f5550b Restrict max-memory to Extract() calls only 2022-02-11 14:19:56 -06:00
Matthew Jaffee
4fb22e495c
Merge pull request #1916 from molecula/test-port-conflicts
more binding to 0==less port conflicts in CI
2022-02-11 14:04:52 -06:00
kcrodgers24
4e7c72cc00 make etcd schema primary source of truth for indexes and fields 2022-02-11 11:47:49 -08:00
Matthew Jaffee
b5dae698ff remove unused env var from test
cluster.hosts is no longer a config option since move to etcd
2022-02-11 12:02:10 -06:00
Matthew Jaffee
53a33134d9 add verbose output to race tests 2022-02-11 12:02:10 -06:00
Matthew Jaffee
102a6e723b more binding to 0==less port conflicts in CI 2022-02-11 12:02:10 -06:00
souhailanoor
7a2929d788
Merge pull request #1913 from molecula/clustertests-coverage
FB-1183: Enable code coverage for clustertests
2022-02-11 11:50:36 -06:00
Souhaila Noor
7983a7506f - Need to get code coverage on the server and client side
- For server side, used an instrumented binary with a test that wraps around the main entrypoint for featurebase
- Every time, the binary is called, a new coverage file is generated.
- For the client side, used the standard -coverprofile flag for go test to generate code coverage
- For backup test that's expected to fail, needed to call Run call in backup.go directly. The code coverage is not written to disk for an instrumented binary if there is an error.
2022-02-11 11:26:00 -06:00
tgruben
064ed9af1a
Merge branch 'master' into sup-146 2022-02-11 11:22:12 -06:00
Todd Gruben
8d5cdbdd77 roaring-migrate bug;performance improvements 2022-02-11 11:19:44 -06:00
Garrison Davis
33c7e16c24
Merge pull request #1917 from molecula/gd-examine-aws-perms
Investigating AWS credential issues
2022-02-11 09:32:57 -07:00
garrison.davis@molecula.com
054f7c6cce Make wget less noisy 2022-02-11 08:57:23 -07:00
garrison.davis@molecula.com
27024de323 Use profile explicitly 2022-02-11 08:55:57 -07:00
Garrison Davis
a21dd96b2d
Merge pull request #1912 from molecula/gd-instance-scale-in-protection
Stop termination in the gauntlet stage
2022-02-09 17:01:06 -07:00
Garrison Davis
26dc93d761
Merge branch 'master' into gd-instance-scale-in-protection 2022-02-09 16:41:59 -07:00
garrison.davis@molecula.com
62e6544089 Stop termination in the gauntlet stage
We have pipelines that get to the gauntlet stage then get failed because
the ASG scales-in before the gauntlet stage finishes. (4/6 of the last
gauntlet failures were from this failure.)

There are a few ways to fix this, but my proposal is to turn on scale-in
protection to stop scaling in the instance running the gauntlet job
(scale in other instances instead), then turn off the scale-in
protection after the gauntlet test is run.
2022-02-09 16:22:10 -07:00
Samir Patel
1dc0d2c88b
Merge pull request #1910 from molecula/pql-variables
[FB-1063] Dynamically expand queries based on $variable values
2022-02-09 16:58:33 -05:00
Samir Patel
96de9834bc
Merge branch 'master' into pql-variables 2022-02-09 14:40:18 -05:00
Samir Patel
39c9a062aa address feedback 2022-02-09 13:16:19 -06:00
Samir Patel
be68241d8e add test 2022-02-09 12:33:12 -06:00
Samir Patel
bfcbf9d784 change interfaceOrVariable type 2022-02-09 11:29:11 -06:00
Samir Patel
edc16a61ea remove comment 2022-02-08 16:08:04 -06:00
Samir Patel
4fee777c23 Merge branch 'pql-variables' of github.com:molecula/featurebase into pql-variables 2022-02-08 16:02:56 -06:00
Samir Patel
9e8b968c19 Refactor ExpandVars to reduce complexity 2022-02-08 15:58:12 -06:00
Samir Patel
cd0bdd4c30 refactor 2022-02-08 15:43:14 -06:00
Samir Patel
fbe23915cf support ConstRow expansion and cleanup 2022-02-08 13:39:22 -06:00
Matthew Jaffee
456e8d6417
Merge pull request #1907 from molecula/fb-1108-3-cleanup
Fb 1108 3 cleanup
2022-02-08 09:50:01 -06:00