Commit graph

365 commits

Author SHA1 Message Date
Cody Soyland
7ede65bf80
Merge branch 'master' into shardwidth22 2019-04-11 10:10:47 -05:00
Cody Soyland
7bb6fdffcb Add correct content type to query responses. Fixes #1873 2019-04-10 15:49:33 -05:00
Cody Soyland
992a075cfb Return empty result set when query empty. Fixes #1840 2019-04-10 15:27:12 -05:00
Matt Jaffee
d5cfe880f7
address race condition by getting cluster nodes with lock
needed an unlocked version of sendsync for use within the cluster, so also
implemented that. Added a number of tests trying to reproduce the issue, but was
not able to. Not sure it's worth keeping the new tests.
2019-04-05 15:40:24 -05:00
Matt Jaffee
836b467d3d
add support to modify shard width at build time
use "make <x> SHARD_WIDTH=nn"

fix tests to run and pass at different shardwidths

add shardwidth22 test to circle ci
2019-04-04 13:46:26 -05:00
Matt Jaffee
4ed2bfb3ca
increase default max map and file counts
Explained in a comment:

 We default these Max File/Map counts very high. This is basically a
 backwards compatibility thing where we don't want to cause different
 behavior for those who had previously set their system limits high,
 and weren't experiencing any bad behavior. Ideally you want these set
 a bit below your system limits.
2019-03-29 15:39:01 -05:00
Seebs
5ee87bbf7c add server stats to /info endpoint
report the approximate hardware specs (CPU speed, cores, memory)
of the server in the /info endpoint. This may be useful when
benchmarking.

We do some workarounds because gopsutil's core count output is
confusingly different between Linux and Darwin, and the MHz output
is usually wrong on Linux. Intel's app notes say to just parse
the model string. Whyyyyyyy.
2019-03-26 09:14:51 -05:00
Matt Jaffee
9f4a9421bc
fix missing quote in toml tag. unclear how test could pass without it 2019-03-25 12:16:24 -05:00
Matt Jaffee
599b2f4a9e
implement config options for block profile rate and mutex fraction
set sane defaults. The performance overhead seems to be negligible, and this will allow us to obtain mutex and blocking profiles from running Pilosas by default.
2019-03-25 11:38:01 -05:00
Matt Jaffee
e7f65cf7be
implement global open file counter using syswrap
close files after using them if global max is passed.

I originally implemented this without the global count—just always closing files
when done with them, and reopening for new writes. This was crazy slow for that
one test that uses mustSetBits in a big loop. I modified the test to use
importRoaring and everything worked better (though much more slowly).

After adding the global counter, I ran the tests with that one test using
mustSetBits again, and the performance was similar to master. After completing
this PR, I ran the tests with the max limit set to 5—they still passed but were
much slower.
2019-03-23 14:52:16 -05:00
Matt Jaffee
226f15446b
lock MaxMapCount and fix unused var 2019-03-19 12:55:26 -05:00
Matt Jaffee
e469285fe3
add fragment mmap tracking and limiting
in the case that the map limit is reached, we'll fall back to reading the file
into memory normally.
2019-03-19 12:55:26 -05:00
Matt Jaffee
e33ca2d0ae
use UnionInPlace in import-roaring
get the count of the existing fragment and compare it to the incoming bits to
decide which should be unioned into the other. This should generally result in
far fewer allocations, though there is much work that needs to be done within
UnionInPlace to further improve things.

unrelatedly, I added a TODO to change the long-query-time option to move it out
of cluster. It should probably be happening at the API level so that different
handlers can reuse it, but if we're going to do that we'll want to make sure
that any potentially time intensive operations are pulled into api from
handler (e.g. protobuf decoding)
2019-03-11 17:43:55 -05:00
Yuce Tekol
767062ab7c
Adds shardWidth to index info in schema 2019-03-01 14:57:46 +03:00
Travis Turner
efb9f97e61
Advertise address and listen on 0.0.0.0
This commit adds support for advertise address by using a new config
option `advertise`, or by defaulting its value to that
specified in `bind`.

Also adds support for listening on 0.0.0.0 by trying to determine
the preferred outbound IP to use for the advertise address.
2019-01-21 22:36:55 -06:00
Matt Jaffee
6f4dee5e31
pass loggers around properly in gossip 2019-01-21 14:47:02 -06:00
Matt Jaffee
f1ecead069
fix failing tests due to staticcheck fixes 2019-01-21 14:38:58 -06:00
Yuce Tekol
dc735c17b8
Fixes #1805. Fixes Store call error messages 2019-01-16 20:52:33 +03:00
Yuce Tekol
65c30283d7
adds tests for GroupBy with keys; removes unused Bit message from proto 2019-01-03 15:20:02 +03:00
Matt Jaffee
31ab3d37b8
add stress tests
these produce an issue on master, but it is fixed on this branch
2018-12-19 17:21:57 -06:00
Travis Turner
d28170ddc6
Syncs AvailableShards when handling a ResizeInstruction.
There was a situation where availableShards on a new
node were not in sync with the cluster, so queries
following a resize were incorrect.
- Start a one-node cluster.
- Write data to shards 0 and 1
- Start a second node.
In the case where the hash algo was moving shard 0 to
node1, then node1 only knew about shard 0, so queries
to node1 would be incomplete.

This PR modifies the ResizeInstruction message to replace
`Schema` with `NodeStatus` (which contains both `Schema` and
`AvailableShards`). So now when a resize instruction is received,
the receiving node is able to sync its schema and availableShards.
2018-12-18 08:34:48 -06:00
Matt Jaffee
ef6db5cc1a
propogate updates to node details (not just additions and deletions)
to all nodes in cluster, not just coordinator
2018-12-04 14:03:14 -06:00
Cody Soyland
53dfccbde4
Merge branch 'master' into arm64-support 2018-11-30 11:05:04 -06:00
Cody Soyland
f0c6394c61 Use syscall.Dup3 on ARM64 as Dup2 is unsupported 2018-11-27 11:03:59 -06:00
Yuce Tekol
d543689868
updated translate keys test to include new keys 2018-11-26 17:52:53 +03:00
Yuce Tekol
eb9e609794
Merged with master 2018-11-26 17:03:38 +03:00
Ben Johnson
8e49332b25 Add distributed tracing. 2018-11-21 15:08:33 -06:00
Yuce Tekol
81354461a0
Merge branch 'master' into 1710-suppress-std-view-on-time-fields 2018-11-21 18:44:29 +03:00
Yuce Tekol
12112e0aef
Merged with master; check for empty roaring data 2018-11-21 18:22:40 +03:00
Yuce Tekol
ac91635628
Merged with master 2018-11-21 18:16:43 +03:00
Yuce Tekol
2c91bf69b3
Merge branch 'master' into translate-keys-endpoint 2018-11-21 16:38:23 +03:00
Yuce Tekol
9c05155db4
Added /internal/translate/keys endpoint 2018-11-21 16:35:50 +03:00
Yuce Tekol
1faa789b31
remove ImportRoaringRequestView type 2018-11-21 14:53:16 +03:00
Yuce Tekol
3d54f737cd
ditch OptFieldTypeTimeWithOptions 2018-11-20 23:21:09 +03:00
Matt Jaffee
77598c2cc6
dup log output onto stderr to catch panics in log file 2018-11-20 14:08:07 -06:00
Matt Jaffee
65f478470f
logging cleanup - start with lowercase unless reporting error or warning 2018-11-20 14:08:06 -06:00
Seebs
a203313143 move Logger and Stats to their own packages
I'd like to add stat tracking to Roaring, which means it
has to be able to import the stats package, which means
stats has to be a package rather than part of the pilosa
package. If stats stops being in pilosa, it still needs
a way to import logger, so logger also has to leave the
pilosa package. Then everything using them needs to import
them and use package selectors on their names.

This doesn't actually add the stats support to roaring,
it just makes it so there's a way to import the stats
code from something in the roaring package.
2018-11-15 15:10:44 -06:00
Yuce Tekol
0fe5d56f68
Merged with master 2018-11-15 21:19:58 +03:00
Matt Jaffee
90c5f64b19
filter memberlist debug and info logs, use t.Log instead of fmt in cluster tests 2018-11-12 14:01:57 -06:00
Yuce Tekol
1642e22872
fixed handler tests 2018-11-12 19:24:32 +03:00
Yuce Tekol
84c04900e1
Import roaring enpoint accepts a list of views 2018-11-12 18:43:59 +03:00
Matt Jaffee
deae8ce7c0
improvements to clustertests and fix cluster pause bug by state sharing 2018-11-09 11:28:19 -06:00
Yuce Tekol
7913a419ae
adds NoStandardView field option. Fixes #1710 2018-11-08 18:33:39 +03:00
Matt Jaffee
ec3982c0ff
pull out advertise URI changes 2018-11-02 16:10:39 -05:00
Matt Jaffee
d86e9ed3ea
add docker based cluster tests, remove proxy stuff, fix advertise 2018-11-02 14:41:42 -05:00
Matt Jaffee
62c1bfe90e
implement MustNewClusterWithProxy and drop/undrop for partitioning 2018-10-26 16:13:20 -05:00
Matt Jaffee
28591b4a91
WIP: figure out why config.Gossip.Port is 0 after cluster start 2018-10-24 16:56:32 -05:00
Matt Jaffee
8db7a78a93
unpushed WIP on cluster-tests 2018-10-23 11:10:24 -05:00
Travis Turner
42531f72fb
prevent closing os.Stdout or os.Stderr (used in verbose test logging) 2018-10-17 17:59:57 -05:00
Yuce Tekol
066c3a4853
Fixes #1660 2018-10-01 14:15:51 +03:00