Commit graph

12 commits

Author SHA1 Message Date
Seebs
32fec70816 track closing status for index/field/view, shut down cache flush early
This is a lot more complex than it sounds like it will be.

We shut down the cache flush when a holder is closed, but if you're
deleting an index, we don't check for that, and can have a cache flush
still creating cache files in an index which could conceivably result
in os.RemoteAll() failing. This shouldn't happen often, but it's happened
at least once.

To address this, first, we make sure that every tier of this operation
bails as quickly as it can after the thing it's working on closes. Second,
we retry RemoveAll.

Unfortunately, some things get reopened, so we have to handle that,
have mutexes covering the access to the channel, and so on. Also, some
things were getting double-closed, which was previously harmless but
could now fail. So, first, catch all the existing double-closes and
remove them, second, make the double-close fail with an error. Note
that virtually none of the tests check for errors on close.

This passes tests and should be unable to hit the original problem.
Unfortunately, it's unreasonably hard to check that, because it
requires an incredible coincidence of timing on the delete aligning
with a cache flush.
2022-03-18 14:41:44 -05:00
Ben Johnson
9ebf0e2119 Upgrade go.mod to featurebase/v3 2022-01-21 10:57:05 -07:00
reesporte
48aef0c8a4 add copyright notice back in
```bash
for file in `cat diffys`; do
   printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file;
done
```
2021-12-10 11:01:04 -06:00
reesporte
4c53f86e82 removed license from each go file
i used this script, a little clunky but it got the job done

```bash
for file in `find . -type f -print | grep '\.go'`; do
    sed '1,/^\/\/ limitations under the License.$/d' $file > $file.tmp;
    result=`cat $file.tmp`
    if [[ result != "" ]]; then
        gofmt $file.tmp &> /dev/null;
        if [[ $? == 0 ]]; then
            mv $file.tmp $file && gofmt -w $file;
        else
            rm $file.tmp;
        fi
    else
        rm $file.tmp;
    fi
done
```
2021-12-10 09:17:17 -06:00
Ben Johnson
98e7ade591 CORE-809: Aggregate COUNT() with INNER JOIN 2021-10-07 14:20:07 -06:00
Ben Johnson
1527eea14b Fix SQL column mappings 2021-09-25 09:36:11 -06:00
Ben Johnson
ff8f0cab96 Add SQL type checking 2021-09-24 14:02:20 -06:00
Ben Johnson
b4cbd45b84 Implement SQL GROUP BY 2021-09-19 08:45:35 -06:00
Ben Johnson
92646cbdf7 Implement non-aggregate SELECT query 2021-09-08 08:09:54 -06:00
Ben Johnson
6bf854862b Handle SQL WHERE clause 2021-08-26 08:25:16 -06:00
Ben Johnson
5122c2decc Refactor SQL planner to inside Server 2021-08-16 13:12:16 -06:00
Ben Johnson
9b8dc3d7e6 Implement basic SQL COUNT(*) query 2021-08-13 10:41:39 -06:00