Commit graph

121 commits

Author SHA1 Message Date
Kuba Podgórski
4f0740ae4f Update handler.go 2020-02-05 22:17:45 +01: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
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
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
7bb6fdffcb Add correct content type to query responses. Fixes #1873 2019-04-10 15:49:33 -05:00
Matt Jaffee
daa87d8e12
fix staticcheck warnings 2019-01-21 14:24:11 -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
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
Yuce Tekol
9c05155db4
Added /internal/translate/keys endpoint 2018-11-21 16:35:50 +03:00
Yuce Tekol
3d54f737cd
ditch OptFieldTypeTimeWithOptions 2018-11-20 23:21:09 +03: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
84c04900e1
Import roaring enpoint accepts a list of views 2018-11-12 18:43:59 +03:00
Yuce Tekol
7913a419ae
adds NoStandardView field option. Fixes #1710 2018-11-08 18:33:39 +03:00
Travis Turner
063caed8d1
forward imports to non-coordinator shards 2018-11-05 17:39:42 -06:00
Seebs
ce815471fe Drop now-superfluous methodNotAllowedHandler
Long ago, the maintainers of gorilla/mux concluded that
it was a "wontfix" to return StatusMethodNotAllowed instead
of StatusNotFound for a method mismatch. Pilosa had a
workaround for this for the most common case (GET requests
to /index/{index}/query), and a TODO to address the other
cases.

While browsing the go-pilosa client code, I noticed that there
is a test for roaring import support which relies on getting
StatusMethodNotAllowed.  But how can this work, if gorilla/mux
doesn't do that?

Answer: They started doing it in mid-2017, apparently:
	https://github.com/gorilla/mux/issues/271

Dropping this code changes the exact text of the message
produced for that one case, but not the status code,
and makes the behavior less confusing.
2018-11-01 12:59:58 -05:00
Travis Turner
e69a8f3db4
handle clear flag on import roaring (http package) 2018-10-24 15:16:08 -05:00
Travis Turner
a7a15c64a2
support clear imports to int fields. fix bug in fragment.sum 2018-10-23 17:37:57 -05:00
Travis Turner
caf8e06712
add clear functional option for imports 2018-10-23 17:37:57 -05:00
Ben Johnson
f8608227d1
Add DeleteAvailableShard()
This commit adds the ability to remove an 'available shard'
from the shard cache. This does not affect shards known to be
available because of local data.
2018-10-17 08:50:06 -06:00