Commit graph

6716 commits

Author SHA1 Message Date
seebs
a6bd285128
Merge pull request #1554 from seebs/bitmaaaap
report more meaningful change counts, address various ops log and bitmap inspection issues.
2021-03-29 18:54:38 -05:00
Seebs
7fcffdf855 additional fragment tests: bitmap file growth, TxBitmap data loss
Checking issues encountered while tracking down an unexpected disk
usage increase.
2021-03-29 18:53:17 -05:00
Seebs
6416b895c0 TxBitmap: track seen container keys
We can't assume that a container we've seen stays present in our bitmap
after possible remove operations. Solution: Track keys seen.
2021-03-29 18:53:17 -05:00
Seebs
a94c745a7f drop "batched" flag from Add operation
The "batched" flag creates a complexity which is that the return value of Add
might or might not be meaningful, but it doesn't really buy us very much.

If we are concerned about the ops log size of writing single ops as 21-byte
arrays of 1 op rather than as 13-byte ops, we can make the AddN code smarter
about how it writes ops. And probably should.

Along with this, change Remove to use the batched operation form, which
writes a more meaningful ops log, and return a meaningful value for changes
made. Otherwise, it ends up writing potentially thousands of ops to the
ops log without reporting any OpN, because the number of ops written isn't
the same as the number of changes those ops made. This could result in
files growing by megabytes without OpN changing.

There was a comment here about a test failing with RemoveN. I can't prove
it, but I strongly suspect that this was actually a result of that test
case hitting a particular bug that we eventually fixed, and which we might
have fixed sooner if we'd realized why using RemoveN made that test
fail.
2021-03-29 18:53:17 -05:00
Seebs
3ef2c84d3c bitmap unmarshalling and testing bug fixes
When unmarshalling ops, we weren't adding a meaningful OpN to them,
resulting in misleading reports from `pilosa inspect`. Also, we were
mistakenly reporting things as "mapped" when they were actually
using their internal storage (as with small array containers).

Add the "sanity check" to `pilosa inspect` so that errors like the
above get noticed more easily and corrected. Also, to make that work,
have roaring.InspectBinary actually put containers in the bitmap
it creates rather than just creating info entries for them.
2021-03-29 15:11:33 -05:00
Seebs
77f4ff1cfd fix bitmap.BitwiseEqual bugs
bitmap.BitwiseEqual had a couple of subtle bugs, and the net result
is that if the bitmap you were comparing to had an empty container after
the original bitmap ran out of containers, we'd spuriously report
the container as existing and being... the last container in the original,
actually.

Issues are both that we were grabbing the value from the wrong iterator,
and also that we were iterating twice per loop, and thus could also
have missed a non-empty container immediately following an empty one.
2021-03-29 15:11:33 -05:00
Cody Soyland
f1f7bd6327
Merge pull request #1406 from codysoyland/upgrade-lattice
Upgrade lattice
2021-02-09 15:19:04 -06:00
Cody Soyland
0227d8306f
Upgrade lattice 2021-02-09 15:00:11 -06:00
Alan Bernstein
8e637cc34a
Merge pull request #1390 from alanbernstein/memory-usage
CORE-162 Add memory info to /ui/usage response
2021-02-03 16:36:57 -06:00
Alan Bernstein
6c139935f7 Add memory info to /ui/usage response 2021-02-03 14:18:29 -06:00
nagamocha3000
52ab7e5a99
Merge pull request #1379 from nagamocha3000/fix-core-26
Close process on fragment.openStorage error
2021-02-03 19:18:58 +03:00
nagamocha3000
92426a9d1b Close process on fragment.openStorage error
When *fragment.openStorage is invoked in both f.importValue and
f.importValueSmallWrite and it returns an error, this means there's
some underlying error with the storage device and at the point of this
commit, the sane thing to do is to close the process, otherwise the
operation of Pilosa might proceed in an inconsistent state thus
precipiatting other silent but hairy errors along the way such as
dereferencing *fragment.gen later on which is set to nil once
openStorage fails.
2021-02-03 18:47:10 +03:00
Ben Johnson
c75d5553b9
Merge pull request #1373 from molecula/bench
Update keyed/unkeyed benchmarks
2021-02-01 14:39:21 -07:00
Ben Johnson
0900e7b9d2
Merge branch 'master' into bench 2021-02-01 14:10:15 -07:00
Cody Soyland
a057cc9899
Merge pull request #1375 from codysoyland/duration-header
CORE-27 Add duration header to all gRPC query results
2021-02-01 11:55:55 -06:00
Cody Soyland
0e22ed71cc
Fix instances of context.Background that need mocked context 2021-02-01 11:40:45 -06:00
Cody Soyland
c30e3f0c2d
Move duration header to fix error handling 2021-02-01 11:40:45 -06:00
Cody Soyland
e2331372d8
Handle errors 2021-02-01 11:40:45 -06:00
Cody Soyland
367425bba1
Add duration header to all gRPC query results 2021-02-01 11:40:43 -06:00
Alan Bernstein
51e41ee6b2
Merge pull request #1331 from alanbernstein/field-usage
Show disk usage broken down by field and keys
2021-02-01 11:31:29 -06:00
Alan Bernstein
e981b162f0 Upgrade lattice 2021-01-29 17:48:24 -06:00
Alan Bernstein
1e7c4d7e8e Include metadata AKA 'other' in response 2021-01-29 17:48:24 -06:00
Alan Bernstein
5beb2664b0 Use simpler test 2021-01-29 17:48:24 -06:00
Alan Bernstein
c81ea88847 Fix total summation 2021-01-29 17:48:24 -06:00
Alan Bernstein
15443b371c Force consistent timestamp width in startup log 2021-01-29 17:48:24 -06:00
Alan Bernstein
5dc00883bd Add more involved diskUsage test 2021-01-29 17:48:24 -06:00
Alan Bernstein
703bd14048 Fix errors in usage check 2021-01-29 17:48:24 -06:00
Alan Bernstein
85fad859e2 Correct some disk usage computations 2021-01-29 17:48:24 -06:00
Ben Johnson
32a35805a4 Add RBF index/field usage stats 2021-01-29 17:48:24 -06:00
Alan Bernstein
e397d35ed5 Include roaring field and key details in usage endpoint 2021-01-29 17:48:24 -06:00
Ben Johnson
ea653eb9a4
Merge branch 'master' into bench 2021-01-29 12:46:26 -07:00
Nia
20d55f0805
Merge pull request #1369 from niaow/count-global
CORE-29 Invoke pre-calls directly in count operations (fixes Count(Distinct()) on negative integers)
2021-01-29 11:20:29 -05:00
Nia
2961a69bd2
Merge branch 'master' into count-global 2021-01-29 11:14:02 -05:00
Alan Bernstein
1f87b54e5f
Merge pull request #1361 from alanbernstein/distinct-crash
CORE-32 Handle nil result in signed row translation
2021-01-29 10:13:48 -06:00
Nia
13db91379f
Merge branch 'master' into count-global 2021-01-29 10:57:46 -05:00
Alan Bernstein
c4455acbd8 Use inconsistent JSON schema to reach Distinct translation error condition 2021-01-29 09:39:31 -06:00
Alan Bernstein
4fba6bea82 Prevent nil pointer exception during Distinct key translation 2021-01-29 09:39:01 -06:00
Ben Johnson
60b6eecc7a Update keyed/unkeyed benchmarks 2021-01-28 16:36:45 -07:00
Maxton Huff
4b33a7fe16
Merge pull request #1368 from Maxtonian/mmap
Mmap limit comparison warning message for Linux
2021-01-27 10:33:43 -06:00
Maxton Huff
7d82c55274
Merge branch 'master' into mmap 2021-01-27 10:15:50 -06:00
Maxton Huff
927db378b4 add linux OS check and the way mmap limit is read 2021-01-27 09:52:13 -06:00
Nia Weiss
0d97ec559b
switch signed count distinct test to use TestVariousQueries 2021-01-27 10:29:40 -05:00
Matthew Jaffee
f84f43ec64
Merge pull request #1370 from travisturner/distinctset-empty-row
Return zero-bit row (with Index/Field) instead of nil in executeDistinctShardSet
2021-01-26 20:50:38 -06:00
Travis
48ac989e6a
Return zero-bit row (with Index/Field) instead of nil in executeDistinctShardSet 2021-01-26 15:47:28 -06:00
Nia Weiss
ac09c11bad
Invoke precalls directly in count operations
This changes Count(Precall()) operations to execute the precall directly inside of the count operation, bypassing the transformation to a Precomputed() call.
Eliminating the Precomputed() step causes Count(Distinct()) to work properly on negative integers.
2021-01-26 12:44:03 -05:00
Maxton Huff
8c36da9eeb Merge branch 'mmap' of github.com:Maxtonian/pilosa into mmap 2021-01-26 11:27:12 -06:00
Maxton Huff
3982a8e970 format messages and change mmap comparison logic 2021-01-26 11:26:36 -06:00
Maxton Huff
bd680ef144
Merge branch 'master' into mmap 2021-01-26 10:21:18 -06:00
seebs
89f1dfb239
Merge pull request #1367 from seebs/countRange
RBF countRange: Handle partial counts on bitmapPtr containers
2021-01-26 09:51:09 -06:00
Maxton Huff
3809fe6734 add error check 2021-01-26 09:35:51 -06:00