Commit graph

219 commits

Author SHA1 Message Date
Kuba Podgórski
1f32fe05b0 Make not found error more verbose (add name) 2020-08-27 19:45:19 +02:00
Kuba Podgórski
4f0740ae4f Update handler.go 2020-02-05 22:17:45 +01:00
Travis Turner
020b72abbf
reset fragment.rowCache after importValue 2019-11-06 13:19:12 -06:00
Matt Jaffee
2651bfbd88
test and fix authentication of client certs btwn cluster nodes
This change should have been adding the "GetClientCertificate"
function in server/tlsconfig.go. This is in addition to the
GetCertificate func which is only used by servers. It ended up being
much more involved for a few reasons:

1. We had no way of passing a configured HTTP client into the
translate store stuff.

2. Our cluster tests assumed http, not HTTPS, and didn't have any way
to pass the necessary configuration in.

3. I encountered what turned out to be an unrelated bug in
cmd/server_test.go which is why I moved "close(m.Started)" in
server/server.go. Basically, I was running something on port 10111
which caused the test to fail (because it was trying to bind to that),
but the failure was not immediately caught during server startup
because the m.Started channel got closed which allowed the test code
to fall through to where it called m.Close() which then got a nil
pointer exception because m.Handler had never been set up.

4. Our test code was assuming that it could create clients that
ignored the config, which meant they didn't do TLS. I added an
InternalClient() method to pilosa.Server to expose the configured
client.
2019-10-18 15:17:35 -05:00
Ben Johnson
e844e1ad75
Translation store refactor 2019-10-09 08:59:41 -06:00
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Cody Soyland
0ec9d3b7e6 Add support for TLS client certificate verification and custom CA 2019-09-24 11:09:58 -05:00
Cody Soyland
726b001b91
Merge branch 'master' into prometheus 2019-06-10 09:16:09 -05:00
Ben Johnson
815005d461
Merge branch 'master' into allow-translate-key-small-buffer 2019-06-07 14:51:10 -06:00
Cody Soyland
363a19b321 Add request method to stats 2019-06-07 09:20:40 -05:00
Cody Soyland
da04eb7bc3 Use timing instead of histogram for http requests 2019-06-07 09:13:38 -05:00
Cody Soyland
e8dd61d359 Refactor stats collector to middleware, tag path instead of full url 2019-06-07 09:13:37 -05:00
Cody Soyland
fc33f7ea66
Add errantly removed pathParts definition 2019-06-05 21:23:12 -05:00
Cody Soyland
97e1822445
Remove urls from stat names, instead tag http.request stats with url 2019-06-05 21:23:11 -05:00
Cody Soyland
7e4c3b715b
Add basic prometheus support 2019-06-05 21:23:10 -05:00
Ben Johnson
7ff684c193
Allow partial translate file reads.
This commit fixes an issue where translation `LogEntry` must be
read in its entirety, however, large entries can exceed the buffer
size. This has been changed so that partial entries reads are allowed.

The `LogEntry.ReadFrom()` may still generate large byte slices
during reads of large individual fields or keys.
2019-06-04 10:08:52 -06:00
Yuce Tekol
5e102154ca
make linter happy 2019-05-28 14:12:04 +03:00
Yuce Tekol
5f4c5d4d35
added test for 1977 fix 2019-05-28 13:54:12 +03:00
Yuce Tekol
b5e4b90438
fixes #1977 2019-05-27 17:43:53 +03:00
Yuce Tekol
62e2b16b88
set defaults for int field min and max 2019-05-27 15:49:10 +03:00
Ben Johnson
40803372dd
Add min/max constraints; fix tests 2019-05-19 16:05:22 -06:00
Ben Johnson
d4de122549
Add min/max constraints 2019-05-17 15:52:17 -06:00
Ben Johnson
7ed9fba335
Unbounded BSI w/ sign magnitude
This commit implements BSI with variable bit depth using a
sign magnitudeto indicate whether a value is positive or negative.
This also rearranges the existence bit to be the first bit instead
of the last bit.
2019-05-17 15:52:17 -06:00
Matt Jaffee
61bf3d929d
Add more tracing and metdata to importRoaring 2019-04-30 15:49:52 -05:00
Matt Jaffee
9e6662fb00
send POSTed schema to all nodes in cluster
also fix a *bunch* of tests that weren't closing the clusters they
created. Cleaned up one test to use t.Run instead of just checking
everything in a loop
2019-04-29 19:31:23 -05:00
Matt Jaffee
a6ee142403
update docs, add test 2019-04-26 18:27:10 -05:00
Cody Soyland
53fb82ea72
remove errant debugging println
Co-Authored-By: jaffee <matthew.jaffee@gmail.com>
2019-04-26 15:55:10 -05:00
Matt Jaffee
0ef3e5e144
add ability to post schema using holder.applySchema
New API warning: this adds ApplySchema to pilosa.API and allows
POSTing to the /schema endpoint
2019-04-25 16:03:44 -05:00
Seebs
2c6eb66895 check for slightly fewer errors
json.Decoder.Decode() can yield io.EOF which is not actually an
error. This appears to have caused a number of indirect test failures
by making ImportRoaring generally report failure.
2019-04-16 12:07:18 -05:00
Seebs
77d49ded64 so much lint
So with the switch to a new linter, we get a lot of new warnings,
and the majority of them are harmless probably, but a few might be
real. Variously just use _ to suppress warnings, or report errors.
There's probably things here that deserve better fixes, but we can
always revisit it.
2019-04-16 12:07:18 -05:00
Matt Jaffee
f8a8a5d096
return orig error instead of cause in handler
also include the invalid name when erroring that a name is invalid.
2019-04-12 21:28:30 -05:00
Cody Soyland
fdbfc68f7c Add license headers to files missing them and CI check to verify they are present. Fixes #1633 2019-04-12 11:30:41 -05:00
Cody Soyland
7bb6fdffcb Add correct content type to query responses. Fixes #1873 2019-04-10 15:49:33 -05: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
f1ecead069
fix failing tests due to staticcheck fixes 2019-01-21 14:38:58 -06:00
Matt Jaffee
daa87d8e12
fix staticcheck warnings 2019-01-21 14:24:11 -06:00
Ben Johnson
9d1e5ca8ce
Merge Range() into Row() call.
This commit refactors the `Range()` call and merges its functionality
into the `Row()` call.
2019-01-09 15:10:49 -07:00
Matt Jaffee
ff800131cb
ensure internal client closes all response bodies to avoid leaking connections/goroutines 2018-12-19 11:57:47 -06:00
Travis Turner
358c32a165
add test for translate store buffer growth logic. add max limit to buffer size. 2018-12-18 12:48:20 -06:00
Travis Turner
95f05ca4d0
WIP: allow translate log entry buffer to grow
In the case where a translate log entry contained
many key/id pairs, it was possible for the read
buffer (which was allocated at 65536 bytes) to
fail to handle it. This happened when the serialized
LogEntry was larger than 65536 bytes.

This PR adds logic which returns a custom error called
ErrTranslateReadTargetUndersized notifying the reader
to reallocate a larger read buffer and try the read
again.

TODO:
- [ ] Add a max buffer size check to prevent this from doubling the
buffer size with no limit.
- [ ] Add tests.
2018-12-18 09:26:26 -06:00
Travis Turner
84fddbc67f
Replace the /fragment/data endpoint to support cluster resizing 2018-12-18 08:34:47 -06:00
Matt Jaffee
45cd48c1b7
change exists field to _exists 2018-12-17 15:44:50 -06:00
Matt Jaffee
2047ebe377
revert client Timeout addition
suspect that this is somehow causing "cannot assign requested address" bugs for
some users. removing since it wasn't a necessary part of the deadlock fix, but
just seemed like a prudent thing to have.
2018-12-14 11:31:23 -06:00
Matt Jaffee
4b786e1057
attempt to fix deadlock by releasing view lock before broadcasting CreateShard 2018-12-11 15:45:44 -06:00
Yuce Tekol
82a9ef2059 Added /internal/translate/keys endpoint 2018-12-07 16:11:15 -05: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