Commit graph

8879 commits

Author SHA1 Message Date
Matthew Jaffee
3f4bd5ab6b fix tag check to check against null
empty string doesn't work because gitlab doesn't set the variable at
all. How do I know that "null" is correct? Because Fletcher told
me... apparently it's a ruby-ism
2022-02-15 14:20:58 -06:00
Matthew Jaffee
fcb1db7f3b fix up S3 release dump
- remove commit SHA nesting
- add NOTICE, .service files, and .conf
2022-02-14 15:08:58 -06:00
Matthew Jaffee
1eb5f3d7f5 add separate S3 dump step for tags 2022-02-14 12:03:08 -06: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
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
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
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
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
Matthew Jaffee
04b13d9eb6 have test use the cluster.Start helper to avoid port conflicts
cluster.Start creates ephemeral ports for all the etcd stuff, whereas
node.Start uses the default config. I don't know why this test was
using the node.Start, but it passes without it.
2022-02-08 09:30:07 -06:00
Samir Patel
9a52dd1a2c handle rows for the most part 2022-02-07 20:00:05 -06:00
Ben Johnson
4fb795d6cb Parse variables for _field 2022-02-07 15:40:24 -07:00
Samir Patel
f5d0b227fa messing with parser, Rows call
messing around trying to get Rows call to recognize
$ syntax. got Rows to not barf, but it is interpreting $ syntax
as string values for the _field parameter as opposed to a Variable
2022-02-07 16:21:35 -06:00
Samir Patel
a755006d95 match on variable name, not field name 2022-02-07 15:43:32 -06:00
Matthew Jaffee
6cc5d198ee remove unused stuff and fix a bunch of random staticcheck issues
sorry... once I saw, I couldn't unsee
2022-02-07 15:10:10 -06:00
Matthew Jaffee
c2ed9ecdba remove InternalQueryClient 2022-02-07 15:10:10 -06:00
reese
6408debacf
Merge pull request #1905 from molecula/fb1172
fb1172: enable refresh tokens
2022-02-07 14:03:33 -06:00
reesporte
88d2914b15 fb1172: enable refresh tokens
- rip out gobby stuff
- add tokenCache, groupsCache
- refresh the token if needed
- set cookies after authenticate
- remove signature validation, the IDP does that for us
- added way more unit tests
- update older tests to use new API
- add fake idp to authcluster tests
2022-02-07 13:42:11 -06:00
Samir Patel
b3faaa9dc0 handle expanding of Row call
working for equality, but not for inequalityh ATM
2022-02-07 12:55:10 -06:00
reese
e8c123ca23
Merge pull request #1908 from molecula/log-index
log index with query for grpc
2022-02-04 16:53:39 -06:00
reesporte
8097e7dffd update test 2022-02-04 16:26:56 -06:00
reesporte
ede85735df use nfpm 2.11.3 so CI doesn't break 2022-02-04 16:12:20 -06:00
reesporte
1f8efd663c log index with query for grpc 2022-02-04 16:04:19 -06:00
Matthew Jaffee
36b721fd8d
Merge pull request #1902 from molecula/sup-139
[SUP-139] Fix GroupBy with multiple offset int groups
2022-02-04 11:34:36 -06:00
Ben Johnson
f824117df9 Fix GroupBy with multiple offset int groups 2022-02-04 09:36:59 -07:00
Matthew Jaffee
ed736b3cb3
Merge pull request #1904 from molecula/fb-1108-2-move-http-to-core
remove http subpackage and bring implementations into core
2022-02-04 08:56:10 -06:00