[NEW] databases/bbolt

2023-05-25 Thread Pavel Korovin
Hello,

Please find databases/bbolt port attached.
https://pkg.go.dev/go.etcd.io/bbolt

It was nice to have it on hand while recovering corrupted Consul/Vault
databases after power outage.

OK to import?

>From pkg/DESCR:
Package Bbolt implements a low-level key/value store in pure Go. It supports
fully serializable transactions, ACID semantics, and lock-free MVCC with
multiple readers and a single writer. Bolt can be used for projects that want a
simple data store without the need to add large dependencies such as Postgres or
MySQL.

Bolt is a single-level, zero-copy, B+tree data store. This means that Bolt is
optimized for fast read access and does not require recovery in the event of a
system crash. Transactions which have not finished committing will simply be
rolled back in the event of a crash.

The design of Bolt is based on Howard Chu's LMDB database project.

-- 
With best regards,
Pavel Korovin


bbolt-1.3.7.tar.gz
Description: application/tar-gz


Re: [NEW] databases/bbolt

2023-05-26 Thread Stuart Henderson
On 2023/05/25 11:31, Pavel Korovin wrote:
> Hello,
> 
> Please find databases/bbolt port attached.
> https://pkg.go.dev/go.etcd.io/bbolt
> 
> It was nice to have it on hand while recovering corrupted Consul/Vault
> databases after power outage.
> 
> OK to import?
> 
> From pkg/DESCR:
> Package Bbolt implements a low-level key/value store in pure Go. It supports
> fully serializable transactions, ACID semantics, and lock-free MVCC with
> multiple readers and a single writer. Bolt can be used for projects that want 
> a
> simple data store without the need to add large dependencies such as Postgres 
> or
> MySQL.
> 
> Bolt is a single-level, zero-copy, B+tree data store. This means that Bolt is
> optimized for fast read access and does not require recovery in the event of a
> system crash. Transactions which have not finished committing will simply be
> rolled back in the event of a crash.
> 
> The design of Bolt is based on Howard Chu's LMDB database project.

The port generally looks good.

I found DESCR a bit confusing (bbolt vs Bolt) as I wasn't aware of the
history, I've rewritten it a bit which I think is a bit easier for me
to understand.

"make test" fails for me, log below. I don't know if that's important.


bbolt implements a low-level key/value store in pure Go. It supports
fully serializable transactions, ACID semantics, and lock-free MVCC with
multiple readers and a single writer.

It is a fork of Ben Johnson's "Bolt" key/value store aimed at providing
the Go community with an active maintenance and development target for
Bolt.

Bolt can be used for projects that want a simple data store without the
need to add large dependencies such as Postgres or MySQL.

Bolt is a single-level, zero-copy, B+tree data store. This means that
Bolt is optimized for fast read access and does not require recovery
in the event of a system crash. Transactions which have not finished
committing will simply be rolled back in the event of a crash.

The design of Bolt is based on Howard Chu's LMDB database project.


go: downloading github.com/stretchr/testify v1.8.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
seed: 97315
quick settings: count=5, items=1000, ksize=1024, vsize=1024
0001
panic: test timed out after 10m0s
running tests:
TestSimulateNoFreeListSync_1op_10p (11s)

goroutine 115960 [running]:
testing.(*M).startAlarm.func1()
/usr/local/go/src/testing/testing.go:2241 +0x3c5
created by time.goFunc
/usr/local/go/src/time/sleep.go:176 +0x32

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0001384e0, {0x6529c0?, 0xc00015ba50?}, 0x6738b8)
/usr/local/go/src/testing/testing.go:1630 +0x405
testing.runTests.func1(0x816240?)
/usr/local/go/src/testing/testing.go:2036 +0x45
testing.tRunner(0xc0001384e0, 0xc00015bb88)
/usr/local/go/src/testing/testing.go:1576 +0x10b
testing.runTests(0xc000119040?, {0x80fec0, 0xbb, 0xbb}, {0x46768b?, 
0xc00015bc00?, 0x815a60?})
/usr/local/go/src/testing/testing.go:2034 +0x489
testing.(*M).Run(0xc000119040)
/usr/local/go/src/testing/testing.go:1906 +0x63a
go.etcd.io/bbolt_test.TestMain(0x?)
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/quick_test.go:37 
+0x359
main.main()
_testmain.go:457 +0x1d3

goroutine 99127 [chan send]:
go.etcd.io/bbolt_test.testSimulate(0xc000503a00, 0x467ae7?, 0x8, 0x2710, 
0xc038d55f60?)

/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/simulation_test.go:69 +0x35b
go.etcd.io/bbolt_test.TestSimulateNoFreeListSync_1op_10p(0x0?)

/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/simulation_no_freelist_sync_test.go:34
 +0x45
testing.tRunner(0xc000503a00, 0x6738b8)
/usr/local/go/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:1629 +0x3ea

goroutine 115946 [runnable]:
go.etcd.io/bbolt_test.testSimulate.func2()
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/simulation_test.go:85
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1
created by go.etcd.io/bbolt_test.testSimulate

/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/simulation_test.go:85 +0x579

goroutine 115805 [runnable]:
go.etcd.io/bbolt.(*DB).page(...)
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/db.go:1054
go.etcd.io/bbolt.(*Tx).page(0x4166f0, 0xc59998)
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/tx.go:533 +0x61
go.etcd.io/bbolt.(*Bucket).pageNode(0xc59d50?, 0xc00d497800?)
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/bucket.go:740 +0x8d
go.etcd.io/bbolt.(*Cursor).search(0xc59d50, {0xc028d700d0, 0xcd, 0xd0}, 
0xc00030?)
/usr/obj/ports/bbolt-1.3.7/go.etcd.io/bbolt@v1.3.7/cursor.go:272 +0x54
go.etcd.io/bbolt.(*Cursor).searchPage(0xc59d50, {0xc028d700d0, 0xcd, 0xd0}, 
0x621de0?)

Re: [NEW] databases/bbolt

2023-05-26 Thread Pavel Korovin
On 05/26, Stuart Henderson wrote:
> The port generally looks good.
> 
> I found DESCR a bit confusing (bbolt vs Bolt) as I wasn't aware of the
> history, I've rewritten it a bit which I think is a bit easier for me
> to understand.
> 
> "make test" fails for me, log below. I don't know if that's important.

My tests fail in different places, I don't think it's important in case
of using the port for checking/compacting/browsing bbolt database files.
Do you think including NO_TEST = Yes makes sense?

Thank you for correcting description, with updated DESCR is it OK to import?

-- 
With best regards,
Pavel Korovin