This reverts commit f33bb135c8427bf3b0a50af16e879beb3aebb9d1, reversing
changes made to cc41cbb87d0a26d7e236b1c5d9b0b3b020bfdefd.
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
Seems like it was more useful before 263e75d0594f5397905c21e17cd34b68d68441d5,
but now it's only used for statistics which can easily be managed in a
different way. I see no other valid purposes for this list, a reference can
have some value for GC, but if DB user loses a reference to transaction that
is not closed there is not much DB can do. This improves ConcurrentView test
from
workers samples min avg 50% 80% 90% max
1 10 49.323µs 974.287µs 1.068978ms 1.112882ms 1.131938ms 1.131938ms
10 100 32.592µs 685.315µs 980.5µs 1.125385ms 1.137678ms 1.169789ms
100 1000 31.49µs 219.084µs 77.427µs 353.651µs 656.916µs 1.785808ms
1000 10000 30.668µs 1.639366ms 99.128µs 3.086665ms 5.031354ms 16.315849ms
10000 100000 30.818µs 40.893475ms 36.963667ms 78.650583ms 111.553136ms 302.412177ms
to
workers samples min avg 50% 80% 90% max
1 10 78.358µs 964.847µs 1.059159ms 1.073256ms 1.07551ms 1.07551ms
10 100 32.802µs 304.922µs 80.924µs 674.54µs 1.069298ms 1.220625ms
100 1000 30.758µs 304.541µs 64.192µs 397.094µs 1.101991ms 2.183302ms
1000 10000 30.558µs 1.05711ms 92.426µs 2.111896ms 3.317894ms 11.790014ms
10000 100000 30.548µs 10.98898ms 90.742µs 21.740659ms 33.020076ms 135.33094ms
Signed-off-by: Roman Khimov <roman@nspcc.ru>
This introduces an interface for the freelist, splits it into two concrete
implementations.
fixes etcd-io#773
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
The motivation is to get all freelist related logic included
in freelist.go. We are going to introduce freelist interface
in the next step.
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
If there is no logger defined (discardLogger), skip logging altogether for
highly frequent called methods (Put, Delete, CreateBucket,
CreateBucketIfNotExists, DeleteBucket, Begin, Commit, Open, MoveBucket, Sync).
Signed-off-by: Ivan Valdes <ivan@vald.es>
The first word in an allocated struct can be relied upon to be
64-bit aligned. Refer to https://pkg.go.dev/sync/atomic#pkg-note-BUG.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This seems to work on all platforms.
E.g. on Windows it seems to work since 1cb787ee7bfebef44baf98158967a37735e65790.
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
There is no reason to maintain a file size. It's only used
when mapping the db or growing the db; obviously neither
are hot path.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This moves the error variables that had been moved to the
internal/common package during recent refactoring to a non-internal
errors package, once again allowing consumers to test for particular
error conditions.
To preserve API compatibility with bbolt v1.3, these error variables
are also redefined in the bbolt package, with deprecation notice to
migrate to bbolt/errors.
Signed-off-by: Josh Rickmar <jrick@zettaport.com>
Recursive checker confirms database consistency with respect to b-tree
key order constraints:
- keys on pages must be sorted
- keys on children pages are between 2 consecutive keys on parent
branch page).
Signed-off-by: Piotr Tabor <ptab@google.com>