Commit graph

9013 commits

Author SHA1 Message Date
reesporte
92aa99ffa9
Merge pull request #1949 from molecula/fb-1187
use free id bucket to re-use ids
2022-02-28 16:30:48 -06:00
reesporte
287332d820 use free id bucket to re-use ids
this way memory usage doesn't grow without bound when we have lots of deletes and
writes.

fixes [fb-1187](https://molecula.atlassian.net/browse/FB-1187)
2022-02-28 15:56:58 -06:00
seebs
78e55fe410
Merge pull request #1943 from molecula/fb1216
[FB-1216] Improve sum aggregate performance
2022-02-28 15:22:14 -06:00
Seebs
f5954d3cc6 use a pool for containerFilter objects
We create a lot of these during a large GroupBy query or anything else
that creates a ton of filters. Use a pool so we can reuse them, since
most of their data doesn't need to be zeroed out, and typical use
patterns have a lot of sequential creation of these short-lived things
within a goroutine.
2022-02-28 14:41:30 -06:00
Seebs
eb26a86518 implement a BSI-aware filter to avoid OffsetRange calls in fragment.sum
We don't really need to fully extract every row, we just need counts.
This naive approach uses logic similar to BitmapBitmapFilter, but tweaks
it so that we can intercept the existence and sign bit rows, work with
an optional filter, and yield a sum. We accumulate the statistics
internally, rather than using a callback, because I tried to make it
work with a callback and it was a complete mess.

Note the fancy check for container reuse in the BSI Count filter.
This is because intersection(full container, X) is just the original
X, *not* a copy, but in this case we need a copy because RBF
ApplyFilter will in fact reuse a single container's storage for
each consecutive container.
2022-02-28 14:41:30 -06:00
Seebs
67f2312150 trust cell.BitN now
We used to manually do this because we had a number of cases where
BitN wasn't being updated, but so far as we know we've fixed them
and we have run a fair amount of stuff with sanity checks on and
not hit anything, so eliminating the constant recounting on bitwise
containers seems like a win.
2022-02-28 14:41:30 -06:00
Ben Johnson
0e84a30469
Merge pull request #1934 from molecula/fb-1113
[FB-1113] Add test coverage for RBF deletion
2022-02-28 13:34:14 -07:00
Ben Johnson
6948b18052 Add test coverage for RBF deletion 2022-02-28 12:56:24 -07:00
Ben Johnson
0b5a0d449e
Merge pull request #1953 from molecula/sup-156
[SUP-156] Add SQL SELECT mapping test
2022-02-28 12:55:35 -07:00
Ben Johnson
0f70253cc0 Add SQL SELECT mapping test 2022-02-28 12:17:07 -07:00
reesporte
da3ce449ba
Merge pull request #1942 from molecula/fb-1127
rip out ui/usage
2022-02-28 13:16:29 -06:00
reesporte
241550c751 fix sonarcloud code smells 2022-02-28 12:05:44 -06:00
reesporte
248dc4fe85 rip out ui/usage
addresses concerns in [fb-1127](https://molecula.atlassian.net/browse/FB-1127)

TLDR;
/ui/usage was a hotbed for issues and SEs have been turning it off anyway for ages
2022-02-28 12:05:44 -06:00
seebs
2cbcc24639
Merge pull request #1928 from molecula/fb1211
[FB-1211] don't crash on close during reads
2022-02-28 11:52:31 -06:00
Seebs
7dd7557e21 don't dump stuff to stdout for tests
We have some tests that cover stuff like the DumpDot functionality,
but we don't need them to actually write to stdout during ordinary
testing. Dump to buffers which we politely ignore. Yes, we could have
used a dummy writer, but this way it's super easy to display the
contents if we find ourselves suddenly caring.
2022-02-28 11:15:52 -06:00
Seebs
3ced081271 prevent crashes when closing db
When closing, we need to wait for existing Tx to exit before truncating
files and unmapping things. This shouldn't matter, because we don't actually
close the DB until all transactions are done, normally... except for the
background usage-gathering task. But really, it's probably just better to
be conservative.

The actual logic is fancier than it looks. We can't hold db.mu.Lock during
this, or the existing Tx can't exit. So we first grab the lock, set the closed
flag, set up a waiter for all current Tx to exit, and then release the lock.
Now we wait on the current Tx exiting. Once that's done, we grab the locks.
Anything coming in that tries to start a Tx will fail out fairly quickly
because the opened flag is now false, so even if other things get those
locks before we do, they won't keep them or create new Tx.

This makes one test deadlock because it opens a Tx and never closes it,
so we change that test to close its Tx.
2022-02-28 11:15:32 -06:00
Seebs
5901bcd5d6 drop unused helper functions
I have no idea what these functions were for, but we aren't using them
so let's not have them.
2022-02-28 11:14:22 -06:00
tgruben
39903bc17e
Merge pull request #1939 from molecula/FB-1185
[FB-1185] remove string keys on delete to allow for reuse
2022-02-28 10:46:21 -06:00
tgruben
53e3ac3e38
Merge branch 'master' into FB-1185 2022-02-28 10:20:30 -06:00
pokeeffe-molecula
9cfa557bc7
Merge pull request #1946 from molecula/able-perf
only run able perf on master
2022-02-28 10:01:08 -06:00
pokeeffe-molecula
01f27fb743
Merge branch 'master' into able-perf 2022-02-28 09:44:09 -06:00
pokeeffe-molecula
6fa4e1242c only run able perf on master 2022-02-28 09:43:19 -06:00
tgruben
7fbcfdcd17
Merge branch 'master' into FB-1185 2022-02-28 09:42:15 -06:00
seebs
8e57c6f539
Merge pull request #1936 from molecula/bug-like-log
[FB-1176] Check "like" argument applied to keyed fields
2022-02-28 09:34:31 -06:00
Todd Gruben
376af2c25f adust logic to include normalFlow vs recovery after merge 2022-02-28 08:12:03 -06:00
Samir Patel
97ba0c0e4d add test cases for Rows call w/ "like" 2022-02-25 16:54:19 -06:00
Samir Patel
05e98ee678 Check "like" argument applied to keyed fields
Check if queries that have a 'like' argument are applied to keyed
fields. If not, log that the user is trying to use 'like' on an
unsupported field type (as opposed to reporting that there
are no results.)
2022-02-25 16:54:19 -06:00
Todd Gruben
0ed85d6d69 comment cleanup and removed long test 2022-02-25 16:40:04 -06:00
Todd Gruben
d85ac1dca7 missed a test 2022-02-25 16:23:54 -06:00
Todd Gruben
ecaaddcf71 . 2022-02-25 16:23:54 -06:00
Todd Gruben
e64767a886 merge with master 2022-02-25 16:23:54 -06:00
Todd Gruben
cf1de78efd remove string keys on delete to allow for reuse 2022-02-25 16:23:54 -06:00
reesporte
872eb99b9d
Merge pull request #1933 from molecula/data-race-begone
fix some data races
2022-02-25 16:15:47 -06:00
reesporte
45633e23a5 only set bits after the holder is completely setup
This should help prevent a data race. SetBit can, in some cases, cause an
asynchronous task to run which tries to update the stats counter.

But if that task runs while we are modifying the stats counter itself, we have a
data race.
2022-02-25 15:02:24 -06:00
reesporte
6b23925bd7 improve Server WaitGroup concurrent usage
Add a lock to the Server WaitGroup so that if the Server WaitGroup is already
waiting, we won't concurrently add to it and cause a data race.

Also, when adding to the Server WaitGroup, check that the server is not closing
already, since that means we really shouldn't be doing more work.
2022-02-25 15:02:21 -06:00
souhailanoor
4e2eeaf1e9
Merge pull request #1938 from molecula/fb1186
FB-1186: Recover if delete was not completed
2022-02-25 13:07:50 -06:00
Souhaila Noor
574c404a66 addressed review comments 2022-02-25 11:06:06 -06:00
souhailanoor
8890f3ed06
Merge branch 'master' into fb1186 2022-02-25 10:41:27 -06:00
tgruben
f0dc484044
Merge pull request #1941 from molecula/fb-1214
[FB-1214] Fix RBF recovery when using methodical meta page detection
2022-02-25 09:55:21 -06:00
Souhaila Noor
8a95ac344b We check for incomplete deletion when server is started.
When deletion is started, _exists field is updated with row+1.
After deletion is completed, we delete _exists=row+1.
If _exists>=1, then deletion was not completed.

Updated go version in docker to match other requirements.
Removed duplicate error check for grpc.
2022-02-25 09:28:13 -06:00
tgruben
7d07b47350
Merge branch 'master' into fb-1214 2022-02-25 09:10:42 -06:00
pokeeffe-molecula
9909adbd05
Merge pull request #1940 from molecula/able-perf
added an aggregate into the test
2022-02-25 08:52:52 -06:00
pokeeffe-molecula
a1fca4ce3c take out political_party 2022-02-24 19:46:03 -06:00
pokeeffe-molecula
2fb6799565 extend the job timeout 2022-02-24 18:01:07 -06:00
Ben Johnson
28c41e9b4d Fix RBF recovery when using methodical meta page detection 2022-02-24 16:05:12 -07:00
pokeeffe-molecula
83485aa63a added an aggregate into the test 2022-02-24 16:33:02 -06:00
pokeeffe-molecula
c9368d5e7a
Merge pull request #1932 from molecula/able-perf
Able perf
2022-02-24 12:56:19 -06:00
pokeeffe-molecula
4fef282416 removed tfstate.backup files 2022-02-24 10:24:27 -06:00
pokeeffe-molecula
d6210e2421 Merge branch 'master' into able-perf 2022-02-23 14:16:44 -06:00
pokeeffe-molecula
a07264a8d1 split untar and restore 2022-02-23 13:12:03 -06:00