etcd-io / bbolt

An embedded key/value database for Go.
https://go.etcd.io/bbolt
MIT License
8.29k stars 646 forks source link

tx.Commit() - function not implemented #684

Closed gandarez closed 9 months ago

gandarez commented 9 months ago

The tx.Commit() fails with function not implemented for OpenBSD. Is it expected?

alanhamlett commented 9 months ago

Could it be this code?

https://github.com/etcd-io/bbolt/blob/1906d5a77612fbab4ad25139db55caf92610f95a/bolt_openbsd.go#L11

Which either calls File.Sync or unix.Msync.

gandarez commented 9 months ago

Could it be this code?

https://github.com/etcd-io/bbolt/blob/1906d5a77612fbab4ad25139db55caf92610f95a/bolt_openbsd.go#L11

Which either calls File.Sync or unix.Msync.

It's missing go build tag in the top to only build for OpenBSD 🤔

ahrtr commented 9 months ago

It's missing go build tag in the top to only build for OpenBSD

It isn't necessary, because the filename bolt_openbsd.go already has suffix "_openbsd.go".

Unfortunately, I don't have a OpenBSD VM right now, so can't debug the issue. Could you try the main branch, which has more info in the error message?

gandarez commented 9 months ago

Didn't know this approach of suffixing the file. I believe we can try with master branch. I'll let you know soon after we run the tests.

gandarez commented 9 months ago

Updating bbolt to v1.3.8 fixed it.

ahrtr commented 9 months ago

It should have been fixed in https://github.com/etcd-io/bbolt/pull/406 in 1.3.8.