Commit graph

438 commits

Author SHA1 Message Date
rachithrr
f549dae625 CORE-777: Added DecimalAgg field in GroupCount to output decimal sum
-created groupCountDecimal
-added test
2021-09-16 09:43:13 -05:00
Seebs
f019cc7409 make import correctly reflect that it needs a single shard always
In fact, we have a number of things assuming that values passed to Import
always fit within a single known shard, so, drop all the extra complexity
around this, drop the computation of fancy view/shard keys, and so on.

There's a lot of room left to improve this probably but it's at least
better, I think.

Unfortunately, there's a handful of things, basically all of which are
test cases, which were relying on this, so, we also add functionality
for splitting import requests by shards. But this allows us to stop
duplicating each shard's inputs one at a time... which turns out to
mean that we now care that the import operation can write back to the
import request. This only affects test cases, so we adopt a crufty
hack involving cloning import requests in those rare cases, and also
when reusing the same column IDs to write to the existence field that
we'd be using later to write to another field.

Note that even if we weren't overwriting the column IDs with positions,
we'd be sorting the column/row ID lists by row-then-column, which means
we'd still be corrupting the column ID lists. This may want to change
at some point.

We also reuse a single Tx for all the views, because DB-per-shard
means that should work fine, and reduces the cost of doing these
updates, probably.
2021-08-18 13:45:36 -05:00
Seebs
35faa39b20 don't use nil qcx
A nil Qcx is a crime against existence and makes baby pandas cry.

Having taken out the hack that tried to accommodate this when tests did it,
we now have to fix the tests. Oh no.
2021-08-18 13:45:36 -05:00
Ben Johnson
d16978f5dc Add max memory limit to Extract() to prevent OOM
This commit changes the Extract() query to return an error if the
result set gets too large in order to prevent out-of-memory (OOM)
panics.
2021-08-02 08:20:12 -06:00
Mahesh Arumugam
858f889745 FeatureBase Renaming: changing go.mod module name for featurebase 2021-07-19 09:20:30 -07:00
Mahesh Arumugam
357caf68c3 Fix percentile query: field is mandatory (should not crash), fieldnames can be unquoted 2021-06-24 15:10:05 -07:00
nagamocha3000
b1d18a1ba3 Make percentile checker in test-case match executor implementation 2021-06-03 22:14:05 +03:00
Nia Weiss
a72f6425af
add an option to open a postgres transaction in lookup so it isnt actually a lookup 2021-05-26 14:07:52 -04:00
Nia Weiss
f4ba34247f
remove attributes
Attributes are unmaintained and unused.
They have become more of a liability than a benefit.
This change eliminates them from the codebase.
The only user-visible change (assuming that attrs are not used) is that the attrs field will no longer appear in row JSON.
2021-05-14 10:28:08 -04:00
Ben Johnson
bc4ad866c6
Merge branch 'master' into timestamp-epoch 2021-04-14 09:56:25 -06:00
Kuba Podgórski
29fe5cabaa
Merge branch 'master' into heartbeat 2021-04-14 17:10:20 +02:00
Ben Johnson
ea01f7e37c Switch timestamp field to use epoch instead of min/max 2021-04-14 08:46:37 -06:00
Antonio Navarro Perez
43c230039f Reduce executor tests execution time from 2:30 to 30s reusing clusters.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-04-14 11:30:02 +02:00
Seebs
0638101d2a cluster state checking cleanups and fixes
A while back we started just polling the reported cluster state of one node
when starting a cluster for tests. This works fine if we're doing fresh
new etcd queries for every single operation -- but that's insanely
expensive, it turns out.

When we use the watcher, some nodes will report stale data for "a
while", where "a while" appears to be easily a couple dozen milliseconds.
This is probably irrelevant in most real-world cases, because the common
case (detecting a node going down) means that we have at least five
seconds after a node goes down before etcd notices the lease expiring,
and a few milliseconds more or less won't matter.

But we have tests that assume either that node 0 is always the
coordinator (wrong) or that waiting for node 0 to think the cluster
is up means that every node in the cluster thinks the cluster is up,
or at least that it means that the coordinator thinks the cluster is
up. We retried later operations but not the initial ones against
the coordinator.

In fact, we probably want to wait for the entire cluster to think
it's up before we start trying things on clusters.

We also replace the "CheckClusterState" function with the existing
AwaitState call, or a new AssertState which errors out since that's
the way we usually use AwaitState anyway.

In the AwaitPrimaryState function, which used to be
AwaitCoordinatorState in a different long-lost revision, we have
to delay until a primary node is available, or fail if one does
not become available, to avoid a panic. This probably shouldn't
happen anymore, because of the last change:

Also, rovide dummy topology.Node entries before metadata is read.

During initial startup, we want to be able to do things like determine
which node is the primary, even before we've read metadata from them.

To do this, we populate the node list with dummy entries that just have
the ID (the only part we need to sort our list), and a node state of
UNKNOWN.

This breaks the fancy logic for determining whether or not to update
the node data, because the initial status of UNKNOWN matches what we
get from SetMetadata giving us new data so we end up not realizing
that this was actually a meaningful change. But actually, that's
a pretty niche optimization; we usually only get state changes when
there's an actual change in state. The updates here are cheap
and only happen after a write (or on the first query) so it's not
worth making the logic a lot fancier to make it work, when we can
just do the simple thing and update any time the dirty flag is set.

We also standardize on a 50ms delay, because 1ms delays were
really expensive when each check was hitting etcd multiple times,
and 50ms is Usually Long Enough.
2021-04-13 12:37:07 -05:00
Ben Johnson
2864a851ab Fix timestamp Extract() 2021-04-12 13:58:46 -06:00
Ben Johnson
d70eb737cb Fix timestamp field issues 2021-04-09 08:26:12 -06:00
Ben Johnson
cfc725e799 Add timestamp field type support 2021-04-06 10:50:10 -06:00
Nia
d5da6e229c
Merge branch 'master' into external-lookup 2021-03-31 08:12:18 -04:00
Maxton Huff
ff82447647
Merge branch 'master' into percentile 2021-03-30 08:20:45 -05:00
Maxton Huff
13ec97abf5 add new test cases for limits and clarify error messages 2021-03-29 16:55:50 -05:00
Nia Weiss
9bc1b23b7e
change "External" DB to "Lookup" DB 2021-03-29 12:54:29 -04:00
Kuba Podgórski
9a02004a4f Move vprint to separate pakage 2021-03-29 14:29:19 +02:00
Maxton Huff
4ce71eeddf change nth value limit message and number of test int64 nth values 2021-03-26 16:54:44 -05:00
Maxton Huff
87412068f1 add new test to account for int64 nth values 2021-03-26 13:01:31 -05:00
Antonio Navarro Perez
79c6493d9a Fix executor test.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-26 13:21:56 +01:00
Antonio Navarro Perez
7ec85a1c0f Add at least 3 nodes on test clusters.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-26 10:16:41 +01:00
Nia Weiss
e9b92e1cd4
add ExternalLookup query 2021-03-25 13:21:28 -04:00
Maxton Huff
d3438e8a80 correct k calculation and change test nth values 2021-03-24 10:58:47 -05:00
Maxton Huff
40e3acc3e4 change percentile value ranges from 0-1 to 0-100 2021-03-23 16:57:37 -05:00
Nia Weiss
6f421dad69
handle translation errors when using keys against an unkeyed index
This also adds tests for our error outputs.
2021-03-17 12:02:29 -04:00
Kuba Podgórski
1dac4c7622 Consistency with aggregate functions 2021-03-16 15:02:40 +01:00
Matt Jaffee
f97ac4928c
add test for pilosa.Message issue
this doesn't quite work as-is, but I verified that it reproduced/fixed
the issue by adding a panic where the problem log statement
is. There's a follow up ticket to fix the test... it's just a bit open
ended as to the best way to do that.
2021-03-05 14:16:52 -06:00
Travis
ea8b07d380
Merge branch 'master' into disco 2021-03-02 22:11:04 -06:00
Matt Jaffee
1e4cc12bd0
handle 0th percentile properly 2021-03-02 21:47:27 -06:00
Matt Jaffee
b1f9e6ad05
turn off parallel for variousQueries 2021-03-02 20:36:54 -06:00
Matt Jaffee
ad88f4fac8
refactor tests to reuse clusters more 2021-03-02 20:36:54 -06:00
nagamocha3000
7da218727d
Separate out tests on Percentile to top level 2021-03-02 20:36:53 -06:00
nagamocha3000
832c6f1a71
Restore filter argument 2021-03-02 20:36:53 -06:00
nagamocha3000
66d12f88e2
Remove filter to check if it's cause of leaks 2021-03-02 20:36:53 -06:00
nagamocha3000
abe8e61539
Remove check for basic response 2021-03-02 20:36:53 -06:00
nagamocha3000
4e81fd8101
Limit size of nums to 100 2021-03-02 20:36:53 -06:00
nagamocha3000
4be9ac7554
Remove percentile tests temporarily to see if they are the cause 2021-03-02 20:36:53 -06:00
nagamocha3000
1947325e00
Fix error on index name for Percentile query 2021-03-02 20:36:53 -06:00
nagamocha3000
2de543bc55
Rename index to avoid possible conflict 2021-03-02 20:36:52 -06:00
nagamocha3000
a6c157d5db
Fix errenous estimation that caused infinite loop 2021-03-02 20:36:52 -06:00
nagamocha3000
ef58b66e2c
Add ability to compose filter Row Call with Percentile 2021-03-02 20:36:52 -06:00
nagamocha3000
131d4fd97c
Make tests for median more extensive 2021-03-02 20:36:52 -06:00
nagamocha3000
3fb79b4d97
Fix errors on creating pql Call 2021-03-02 20:36:52 -06:00
nagamocha3000
d740a0cda7
Add execution for median 2021-03-02 20:36:52 -06:00
nagamocha3000
26fd199716
Add basic test for Percentile query 2021-03-02 20:36:51 -06:00