Commit graph

6293 commits

Author SHA1 Message Date
Seebs
e84d2d2a59 refactor number parsing a bit
There are subtle inconsistencies, like "01" being a valid decimal but not
a valid integer, which vaguely bug me. Cleaning this up, and the corresponding
parser logic.

A number can't have leading spaces because the grammar doesn't
put spaces in them in the first place, so stop accepting them in the
number syntax. This should never have any impact on anything,
it's just simpler.

Update a couple of test cases to reflect this -- no longer testing
that trailing spaces are okay, now testing that they're not, for
instance.
2020-10-19 13:37:21 -05:00
Seebs
c19d571112 more consistent spacing
We still prohibit a space before a leading '(', which maybe we shouldn't,
but we now allow spaces on both sides of a closing ')' more consistently.
Drop the unneeded "sp" before "close" in the special handling after
null, true, and false, because close now implies that.

Also, refactored the two instances of "sp '=' sp" into a thing called eq,
which may not be worth it.
2020-10-19 13:35:49 -05:00
Seebs
28d18920b9 Make PQL case-insensitive about call names.
Use "" strings for fixed string names. In startCall(), look up the
lowercase conversion of a call name in a table mapping all-lowercase
representations to canonical case, so we don't have to chase down
everyplace in the rest of the code base that assumes "Row" is
capitalized exactly like that.
2020-10-19 13:35:49 -05:00
Seebs
18ed02d7fb drop float/decimal distinction in PQL
PQL always produces decimals, which have effectively-arbitrary range,
but can convert them to floats when required; the executor then requests
this conversion in the handful of cases (SetRowAttrs and SetColumnAttrs)
where it wants floats rather than decimals.

Not yet fixed: The "Range" call may also be wrong now. It was specifying
an "fvalue" but is now effectively getting what used to be called a
"dvalue". However, so far as I can tell, that didn't work before either.
2020-10-19 13:35:49 -05:00
Seebs
b8bb438b69 trivial cleanup of PEG grammar
Drop irrelevant (), simplify the expression of the sp rule.

Perhaps shockingly, this *does not change the generated grammar at all*. The
generated code for:
	sp <- [ \t\n]*
and is identical to the code for:
	sp <- ( ' ' / '\t' / '\n' )*

And in fact, is spelled the latter way in the generated comments.
2020-10-19 13:35:49 -05:00
Seebs
0ea324129f update to new version of peg tool
Want to do some PQL cleanup. A new version of peg turns out to dramatically
alter performance in some cases, so I'm doing the commit for "don't change any
PQL, just change the version of peg" checkin separately.
2020-10-19 13:35:49 -05:00
tgruben
092177aea4
Merge pull request #997 from molecula/bolt_in_badger_out
Use boltdb instead of badger as our all-Go Tx oracle
2020-10-16 17:41:23 -05:00
Jason E. Aten
266b92c025 Use boltdb instead of badger as our all Go Tx oracle.
- remove all badgerdb code.
 - use boltdb instead.
2020-10-16 17:21:21 -05:00
Cody Soyland
3dff03907d
Merge pull request #942 from codysoyland/grpc-web
Add grpc-web to http handler
2020-10-16 15:46:25 -05:00
Cody Soyland
b86b0519af go mod tidy 2020-10-16 15:10:48 -05:00
Cody Soyland
a2ee047868 grpc-web cors test 2020-10-16 11:36:41 -05:00
Cody Soyland
31cd119a7e Move grpc.Server creation into initializer
This fixes an issue with the grpc-web middleware using a nil
grpc.Server instance.
2020-10-16 11:36:41 -05:00
Cody Soyland
04b1152224 Add grpc-web to http handler 2020-10-16 11:36:41 -05:00
jaten-molecula
8da638f685
Merge pull request #979 from seebs/bbolt
switch to etcd boltdb fork
2020-10-15 19:58:31 -05:00
Seebs
0905e858cd uprev golang to 1.14.9
1.14 had a bug in the checkptr code (well, not exactly a bug) which
made it enforce alignment requirements on x86. This turns out not
to be the problem I was seeing, but we should be on 1.14.9 anyway.

To keep this from breaking CI integration with Github, we also
use explicit job names instead of matrix-generated ones, and fix
the CI config syntax up a bit after almost getting that right the
first try. (This patch includes fixes contributed by Cody, and since
I had to rebase and re-approve AGAIN anyway, I might as well squash
the commit history up.)
2020-10-15 19:13:28 -05:00
Seebs
76fe49d390 un-disable checkptr by fixing the memory problems
Step one: switch to etcd.io's bbolt fork of boltdb.

The etcd-io fork of boltdb isn't archived, and has fixes for boltdb's
interactions with checkptr, allowing us to drop the checkptr-disabling
hackery.

This seems to be a drop-in replacement; etcd/bbolt says that the file
format is "fixed" (I believe in the sense of "unchanging"), and I can
run pilosa on an existing data directory with this.

Step two:

Fix missing caps in roaring.go that were also triggering the same
issues.
2020-10-15 19:12:47 -05:00
tgruben
de642ed90c
Merge pull request #993 from molecula/fix983
bluegreentx: default to not dumping full databases
2020-10-15 17:31:55 -05:00
Jason E. Aten
e5a56f1cd2 bluegreentx: default to not dumping full databases 2020-10-15 16:23:19 -05:00
Matthew Jaffee
c859a8aa2b
Merge pull request #981 from jaffee/single-equal-data-race
Fix data race on call map in single '=' logic
2020-10-15 11:40:16 -05:00
Matt Jaffee
00f1f70779
fix data race on call map in single = logic
Add test of single = int query over multiple shards which reproduces
the race

move the code which modifies the PQL call object if a Row query
on an int field uses a single = instead of ==. Instead of processing
this at the shard level, we'll process it during the initial
translation step so that it isn't operated on concurrently.
2020-10-15 10:26:14 -05:00
alanbernstein
4bf81444ba
Merge pull request #951 from molecula/shard-dist-api
Add ui-specific endpoint to report shard distribution data
2020-10-14 21:58:05 -05:00
Alan Bernstein
94e82aea86 Consider available shards 2020-10-14 21:11:02 -05:00
Alan Bernstein
ab502a0f8d Add basic test 2020-10-14 21:11:02 -05:00
Alan Bernstein
510902625e Update test hasher implementations 2020-10-14 21:11:02 -05:00
alan
2a902b3a7b Finish basic shard-distribution endpoint 2020-10-14 21:11:02 -05:00
Alan Bernstein
98cd2dc441 WIP shard distribution endpoint 2020-10-14 21:11:02 -05:00
Cody Soyland
8c9569faca
Merge pull request #982 from codysoyland/circle-config-fix
Fix PR detection logic in CI
2020-10-14 21:07:23 -05:00
Cody Soyland
316bd87a8a Fix PR detection logic in CI 2020-10-14 20:36:04 -05:00
jaten-molecula
fa21c81a27
Merge pull request #963 from molecula/rbf_config
rbf: add DBConfig
2020-10-14 20:12:46 -05:00
jaten-molecula
577600d17b
Merge branch 'master' into rbf_config 2020-10-14 19:57:05 -05:00
jaten-molecula
39a31cc63e
Merge pull request #976 from seebs/impossible
Check more carefully for, and also fix, containers with invalid N
2020-10-14 18:57:02 -05:00
jaten-molecula
eb4b9974ac
Merge branch 'master' into impossible 2020-10-14 18:40:50 -05:00
alanbernstein
ca223c4a79
Merge pull request #934 from alanbernstein/cluster-usage
Collect size-on-disk usage data from all nodes
2020-10-14 16:33:03 -05:00
Alan Bernstein
aff5c0fc57 Skip missing directories 2020-10-14 15:46:19 -05:00
Jason E. Aten
244ba21da7 better names 2020-10-14 13:19:14 -05:00
Jason E. Aten
3a40b586b3 disk usage per index 2020-10-14 12:53:35 -05:00
Alan Bernstein
e2cafd98ef Move index size calculation to TxFactory 2020-10-14 12:20:05 -05:00
Alan Bernstein
7a32eadc64 Move disk capacity lookup to gopsutil wrapper package 2020-10-14 12:20:05 -05:00
Alan Bernstein
6a298590be Set omitempty for disk capacity json 2020-10-14 12:20:05 -05:00
Alan Bernstein
ba4ca1a93e Include disk capacity in usage response 2020-10-14 12:20:05 -05:00
Alan Bernstein
2a44bdd25c Collect size-on-disk usage data from all nodes 2020-10-14 12:20:05 -05:00
Cody Soyland
e1e0b298f5
Merge pull request #964 from codysoyland/check-changelog-label
Check for changelog label in CI
2020-10-14 10:11:45 -05:00
Seebs
c88192b4ac Check more carefully for, and also fix, containers with invalid N
In rare cases, RBF can produce containers which have a recorded N value which
is incorrect. This rarely affects anything, but on some particular queries,
this can result in very strange outcomes, like array containers with more
than 1<<16 entries.

To fix this, we have toContainer specify that it doesn't know the correct
N for the bitmap containers it's creating, which costs extra time for counting,
and should be considered a temporary workaround.

Also, we add a CheckN() function which is controlled by the
roaringparanoia flag, and add a number of calls to it, for instance, as
deferred calls after every container operation when roaringparanoia is
enabled. This means that we get improved confidence that we've caught
the relevant errors, but is not suitable for production use.
2020-10-14 10:03:18 -05:00
Cody Soyland
ca5dbe8d39 Fix pull request filter 2020-10-14 09:42:07 -05:00
Cody Soyland
2ac09af894 Only run on pull requests 2020-10-14 09:29:51 -05:00
Cody Soyland
4e66bbb76b Check for changelog label in CI 2020-10-14 09:29:51 -05:00
seebs
6c14aa965d
Merge pull request #895 from seebs/appendSemantics
use append-like semantics consistently for *Container
2020-10-14 09:04:56 -05:00
jaten-molecula
3d4da8f51b
Merge branch 'master' into appendSemantics 2020-10-14 07:24:18 -05:00
jaten-molecula
20d4268676
Merge branch 'master' into rbf_config 2020-10-14 07:19:37 -05:00
jaten-molecula
a997e713dc
Merge pull request #977 from molecula/readers
pilosa-fsck: the -readers flag controls parallelism
2020-10-13 19:14:09 -05:00