Commit graph

27 commits

Author SHA1 Message Date
Richard Artoul
bb20f058ba Add Repair operation to btree containers 2018-12-07 16:11:16 -05:00
Seebs
456c092930 enterprise/b: Ensure 64-bit range for btree keys.
The cmp() function used to compare btree keys was using the
trick of comparing unsigned values by coercing the result
of subtraction to a signed type. This is fine as long as
the range of differences never actually exceeds the limits
of the signed type. For instance, with int64, as long as
the magnitude of the difference is under 2^63 or so, it
works reasonably well.

Plain int, however, can be a 32-bit type, at which point
the magnitude of difference needed to break it is only
2^31 or so.

Subtraction and type conversion is enough cheaper than
branches that this is worth preserving, but it's worth
preserving by switching to an explicit int64 for the
operation and return type. This will not actually affect
performance except for people using the btree code on
32-bit machines, so it probably won't ever matter.
Which may also be true of the potential wrong answers,
but "might be slower" is a better risk than "might
crash".
2018-11-05 10:45:17 -06:00
Todd Gruben
be3bc105cd fixed upconvert;reverted to released interface 2018-09-25 10:40:04 -05:00
Todd Gruben
64e86614f8 shrank n(container bit count cache) to int32 2018-09-25 09:14:19 -05:00
Cody Soyland
187ded0a52 Fix linter issues: maligned 2018-07-19 11:07:59 -05:00
Cody Soyland
0a9e6bca7a Re-add return variable names removed in 2aa4d6b1. 2018-07-19 08:09:05 -05:00
Cody Soyland
3ca51989c2 Merge branch 'master' into 1515-metalinter-nakedret 2018-07-19 07:52:58 -05:00
Cody Soyland
2aa4d6b12f Fix linter issues: nakedret 2018-07-18 15:23:36 -05:00
Cody Soyland
0b86bbb4f5 Fix linter issues: gochecknoinits 2018-07-18 11:58:27 -05:00
Cody Soyland
2635759893 Fix linter issues: misspell 2018-07-17 12:22:41 -05:00
Cody Soyland
6fbd373256 Unexport b.TreeNew 2018-07-05 23:11:56 -05:00
Cody Soyland
9a1f348580 Unexport b.Tree 2018-07-05 23:11:56 -05:00
Cody Soyland
fede4ac9f0 Unexport b.NewBTreeContainers 2018-07-05 23:11:56 -05:00
Cody Soyland
eac1bec54b Unexport b.Enumerator 2018-07-05 23:11:56 -05:00
Cody Soyland
446bfff91a Unexport b.BTreeContainers 2018-07-05 23:11:56 -05:00
Cody Soyland
b4011778dd Unexport APIOption, b.BTCIterator, API.Holder, API.Serializer, APIOption, http.Handler.API 2018-07-05 23:11:56 -05:00
Todd Gruben
22a546095a fixed reset method on btree plugin 2018-06-22 10:05:41 -05:00
Todd Gruben
643e5e575a fixed crashing issue that was not handling container removal/recycling correctly 2018-06-21 18:39:06 -05:00
Todd Gruben
aa71c08f12 implemented count optimization for btree 2018-06-19 11:01:00 -05:00
Matt Jaffee
4f3a4864f0
add godoc comment to enterprise/enterprise.go 2018-05-15 16:08:54 -05:00
Cody Soyland
1f925324d7 Add enterprise license 2018-05-15 12:20:45 -05:00
Cody Soyland
e8fcb0f055 Use NewFileBitmap for tests to test btree/slice containers separately. 2018-05-15 11:22:19 -05:00
Cody Soyland
71373945da Rename Contiterator -> ContainerIterator 2018-05-15 10:22:02 -05:00
Cody Soyland
251d21dee1 Remove leftover debug log line 2018-05-14 17:51:10 -05:00
Cody Soyland
513c7fd705 B+tree integration work.
Export necessary vars from roaring to fix b+tree containers implementation.
Clean up naming.
Use constructor replacement for enterprise integration.
2018-05-14 17:32:30 -05:00
Cody Soyland
4282e90fe1 Export a few things to enable enterprise/b/containers_btree.go to work 2018-05-14 14:03:46 -05:00
Cody Soyland
faa79a385c Add B+tree to enterprise subpackage 2018-05-11 20:20:24 -05:00