Commit graph

7183 commits

Author SHA1 Message Date
Todd Gruben
8c4d7e09ff re-use pilosa tls settings 2021-03-22 16:48:09 -05:00
Todd Gruben
f52b88a962 etcd tls configuration support 2021-03-22 09:10:32 -05:00
Nia
b6810f3ce7
Merge pull request #1535 from niaow/fix-unkeyed-panic
CORE-382 Handle translation errors when using keys against an unkeyed index
2021-03-17 17:16:55 -04: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
16245b1742
Merge pull request #1534 from kuba--/call-agg/335
CORE-335 Consistency with aggregate functions
2021-03-16 19:54:12 +01:00
Kuba Podgórski
d370452449 Add helper function FirstStringArg 2021-03-16 16:32:35 +01:00
Kuba Podgórski
1dac4c7622 Consistency with aggregate functions 2021-03-16 15:02:40 +01:00
Matthew Jaffee
c6ea56bbad
Merge pull request #1529 from travisturner/cache-bitdepth
[Core-370] Cache BitDepth on bsiGroup during index.Open
2021-03-15 07:38:05 -05:00
Travis
314cf3461d
Cache BitDepth on bsiGroup during index.Open.
Before this change, we were only caching the BitDepth on the
field.options. This was ok as long as applyOptions() was called after
that. But unfortunately, during startup, applyOptions() was called prior
to that being set. So with this commit, we explicitly set the value in
bsiGroup.BitDepth as well.
2021-03-14 22:51:24 -05:00
Matthew Jaffee
9b3cce619a
Merge pull request #1530 from jaffee/revert-custom-json
Revert "Basic pilosa changes for oracle support"
2021-03-14 22:50:37 -05:00
Matt Jaffee
11288c2ae8
Revert "Basic pilosa changes for oracle support"
This reverts commit 47e74f2603.
2021-03-14 22:17:26 -05:00
Nia
c694189648
Merge pull request #1523 from niaow/idalloc-fix
CORE-361 Fix ID allocation API after disco
2021-03-14 16:52:52 -04:00
Nia Weiss
2f4a2bf98f
fix ID allocation API after disco
The ID allocation API was broken because the operations were removed from the list allowed in the NORMAL cluster state.
Additionally the operations were set to only run on non-primaries (where they were actually only supposed to run on the primary).
2021-03-13 07:41:00 -06:00
Nia
ec899bcc64
Merge pull request #1519 from niaow/rbf-typos
fix a typo in the RBF spec
2021-03-13 00:25:12 -05:00
Ben Johnson
ddb8c95737
Merge branch 'master' into rbf-typos 2021-03-12 20:16:17 -07:00
tgruben
29b8501aff
Merge pull request #1527 from tgruben/core-334-fix
[CORE-334]  more graceful error handling for corrupt containers
2021-03-12 15:16:12 -06:00
Todd Gruben
346a248019 Merge branch 'core-334-fix' of github.com:tgruben/privilosa into core-334-fix 2021-03-12 13:28:11 -06:00
Todd Gruben
2711bf321f replace error with wrap 2021-03-12 13:27:28 -06:00
tgruben
fd7ea42451
Merge branch 'master' into core-334-fix 2021-03-12 12:11:52 -06:00
Kuba Podgórski
38c2c4ad6f
Merge pull request #1526 from seebs/testLeaks
CORE-358 Test leaks
2021-03-12 19:10:02 +01:00
Todd Gruben
94d7b295ea added more graceful error handling for corrupt containers 2021-03-12 10:37:40 -06:00
seebs
78ed9a2d57
Merge branch 'master' into testLeaks 2021-03-12 10:02:11 -06:00
Kuba Podgórski
1b486ac812
Merge pull request #1522 from kuba--/core-344
CORE-344: Fix deprecation plan for "github.com/golang/protobuf/protoc-gen-go/generator" package
2021-03-12 15:29:54 +01:00
Kuba Podgórski
61585b251e
Merge branch 'master' into testLeaks 2021-03-12 14:14:03 +01:00
Kuba Podgórski
4043f22db2
Merge branch 'master' into core-344 2021-03-12 14:08:03 +01:00
Travis Turner
81c47b778e
Merge pull request #1525 from travisturner/startup-log-dir
[CORE-362] Create the data directory during "log startup" if it doesn't already exist
2021-03-12 06:47:45 -06:00
Kuba Podgórski
1ba52dbca9 Update go.sum 2021-03-12 13:06:23 +01:00
Kuba Podgórski
a12a130420
Merge branch 'master' into core-344 2021-03-12 12:51:58 +01:00
Kuba Podgórski
ddc924de0c go mod tidy 2021-03-12 12:48:53 +01:00
Seebs
ef8dd91077 report errors more clearly when trying to recreate leases
There's some loose ends here because really we probably want to be
using the top-level server logger, and we should fix that, but in the
mean time, let's not swallow the errors as much, because the last
line printed doesn't actually show what the error was, but it could.

To do this, we distinguish between the current error (which might
be a wrapper around DeadlineExceeded) and a previous error which
we might prefer to return, if one exists, since it's more likely
the "real" cause.
2021-03-11 19:42:10 -06:00
Seebs
1045268f01 use testhook to ensure temporary files and directories are cleaned up
In nearly all cases, we can just switch ioutil.TempDir->testhook.TempDir
and similarly for TempFile. There's one case where we can't because we
need files to be removed before tests are over.

Also in the process give identifiable names to a lot of temporary files
and make sure they're being cleaned up, and don't use "/tmp/foo" as a
file name in a test that could be running in more than one test process
at once. :)
2021-03-11 19:42:10 -06:00
Travis
9e0ea9709a
Create the data directory during "log startup" if it doesn't already exist.
Prior to using etcd for node membership, the data director was created
during the cluster topology setup. Since that no longer exists, we
weren't actually creating the data directory before getting to
logStartup(). So this change ensure that the data directory exists.
2021-03-11 17:31:46 -06:00
tgruben
9b913ce904
Merge pull request #1489 from tgruben/theoracle
Theoracle
2021-03-11 16:11:38 -06:00
tgruben
391588bd1b
Merge branch 'master' into theoracle 2021-03-11 13:56:34 -06:00
Alan Bernstein
7df5375572
Merge pull request #1524 from alanbernstein/fix-null-schema
Represent zero indexes in /schema response as [] instead of null
2021-03-11 13:23:19 -06:00
tgruben
21910ef321
Update main.go 2021-03-11 11:47:57 -06:00
tgruben
a5dceaae11
Update main.go 2021-03-11 11:26:58 -06:00
Alan Bernstein
8e123b821d Replace null with [] in schema response 2021-03-11 11:23:20 -06:00
Todd Gruben
47e74f2603 Basic pilosa changes for oracle support 2021-03-11 11:16:53 -06:00
Kuba Podgórski
95eaab8ffc
Merge pull request #1514 from seebs/discoSyncer
CORE-299 check for nil translate store while reading translate entries
2021-03-11 13:03:24 +01:00
Nia Weiss
e73d9cb61b
fix a typo in the RBF spec 2021-03-10 14:25:38 -05:00
Kuba Podgórski
3fde2dcac2
Merge branch 'master' into discoSyncer 2021-03-10 12:35:10 +01:00
Kuba Podgórski
5af850c64a
Merge pull request #1518 from kuba--/fix-metadata-noder
Get metadata in Tx. Fix Nodes implementation
2021-03-10 11:24:09 +01:00
Kuba Podgórski
4c787870b2 Get metadata in Tx. Fix Nodes implementation 2021-03-10 00:28:49 +01:00
Seebs
810f840839 combine field and index translation readers
There's no need to have two different translation readers, a single
reader can handle both partitions and fields at the same time, so we
can combine them. This may not actually change things much but was
a useful step in diagnosing a different problem with translate readers,
and I think it is a minor improvement so I'm preserving the patch
just in case.
2021-03-09 13:37:51 -06:00
Seebs
76e4181740 don't reuse sync.Mutex between translate readers
The functional option and returned closure combine to result in
us using the same sync.Mutex object for every TranslateReader on
a given server, which means that if one of them isn't producing anything,
we eventually end up waiting on that with all the others blocked
waiting for the lock. Use separate locks for each, of the same
type as the one initially provided as a template. This does mean
that multiple readers can be operating at once, but in theory
no two readers should ever be writing to the same stores, we
think.
2021-03-08 17:04:52 -06:00
Seebs
51744dc77a check for nil translate store while reading translate entries
If we are using replication, we can be a replica translate store for a
partition, which means we start a translate store reader to replicate
data for it. The translation logic does not admit *stopping* the
translate reader, only "resetting" it (stopping and immediately
restarting), so the translate reader just runs until it hits an error
and terminates, which it does even if perhaps it shouldn't. Oops.

Anyway, one potential failure mode is that if you hit timing just
right, you can end up trying to process translation *while* the
index is being closed, and the index can close its translation stores,
and make them all nil, right before we request a store and try to use
it. Another is a similar error, but during the initial startup of the
translate store readers. Either way, we want to error out of the
process cleanly if this happens.

This could also happen during initial creation, perhaps.

We're aborting translation sync on these errors, because otherwise
we'd continue accepting new keys, and then end up with our highest
known key being higher than some keys we missed; this way the next
restart will restart from the last key we have.
2021-03-08 17:04:52 -06:00
Travis Turner
45577494c3
Merge pull request #1517 from travisturner/datadir-take-3
Remove stutter and suffix from backend files
2021-03-08 11:50:42 -06:00
Travis Turner
2a0765d7f0
Merge branch 'master' into datadir-take-3 2021-03-08 11:21:05 -06:00
Kuba Podgórski
d6e9e88872
Merge pull request #1516 from kuba--/test-close
Close resources in TestLeasedKv
2021-03-08 11:01:40 +01:00