1901 Commits

Author SHA1 Message Date
Benjamin Wang
df4e63a768 Update changelog to cover the meta page protection fix
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-26 11:34:23 +01:00
Ivan Valdes
a5955bdb5a
release: narrow down existing tag search
Check for the actual tag by an explicit query, rather than listing all
tags available at the repository.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-06-25 12:25:12 -07:00
Ivan Valdes
979ee92ac7
release: accept release version as argument
Make it consistent with other of our release scripts.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-06-25 12:19:50 -07:00
Ivan Valdes
550aa05cd2
release: Use stage directory to build release
Create a stage directory in the temp file system, and clone the
repository there.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-06-25 11:33:30 -07:00
Benjamin Wang
467bd76e8f
Merge pull request #999 from ivanvc/use-temmplate-for-cross-build-tests
Add template to cross arch build tests
2025-06-25 10:40:57 +01:00
Ivan Valdes
685eda312d
Add template to cross arch build tests
* Create a template to simplify executing tests without repetition.
* Run cross-compilation tests for Windows on Ubuntu (Linux), as every
  platform is being cross-compiled as a sanity check, it could also be
  done using Linux, and simplify the template.
* Remove the GolangCI lint action, as it is linting in Linux (as this is
  not using QEMU, but only cross-compilation), and there's no benefit to
  adding this step, as it's already checked in other workflows.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-06-24 15:44:38 -07:00
Benjamin Wang
68b0ba4c9c
Merge pull request #989 from nspcc-dev/metalock
tx: add missing lock on meta page update
2025-06-24 09:33:57 +01:00
Benjamin Wang
be68cc203b
Merge pull request #986 from Elbehery/20250612-use-qemu-github-workflow
chore(CI): Add QEMU based CI Workflow
2025-06-20 16:32:38 +01:00
Mustafa Elbehery
8723401c19 chore(CI): Add QEMU to CI Workflow
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-06-19 11:13:23 +02:00
Roman Khimov
249746fef4 tx: add missing lock on meta page update
metalock is supposed to protect meta page, but it looks like the only place
where we're modifying it is not protected in fact. Since page update is not
atomic a concurrent reader (RO transaction) can get an inconsistent page. It's
likely to fall back to the other one in this case, but still we better not
allow this to happen.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-06-18 22:27:10 +03:00
Benjamin Wang
092ee98898
Merge pull request #993 from Elbehery/20250615_add_goimport_golangci-lint
chore(CI): add goimports to linter
2025-06-18 09:45:24 +01:00
Benjamin Wang
6a1dfa58fa
Merge pull request #991 from ahrtr/20250615_changelog
Update changelog for 1.4.2 and 1.5.0
2025-06-17 12:57:33 +01:00
Mustafa Elbehery
55e2494a55 chore(CI): add goimports to linter
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-06-15 21:51:36 +02:00
Benjamin Wang
01931e86ec Update changelog for 1.4.2 and 1.5.0
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-15 19:39:02 +01:00
Benjamin Wang
fdf3825aef
Merge pull request #977 from nspcc-dev/optional-statistics
Make statistics optional
2025-06-15 19:37:21 +01:00
Benjamin Wang
fde6016c3c
Merge pull request #988 from Asutorufa/main
fix maxMapSize typo in aix, android, solaris
2025-06-13 09:47:17 +01:00
Asutorufa
f2297c6fad fix maxMapSize typo in aix, android, solaris
Signed-off-by: Asutorufa <16442314+Asutorufa@users.noreply.github.com>
2025-06-13 11:58:56 +08:00
Roman Khimov
87d0cf7deb db: make statistics optional
I think most Bolt users never care about this data, so we're just wasting
time for nothing. This is also one of the exclusive locks that we have on
the View() path. While this patch doesn't change much on its own, because
the other lock is still here (subject to a different patch), once that lock
is removed the difference in concurrent View() test is pretty clear. With
NoStatistics=false:

workers samples min             avg             50%             80%             90%             max
1       10      123.905µs       969.042µs       1.062529ms      1.065585ms      1.071537ms      1.071537ms
10      100     34.636µs        178.176µs       89.7µs          110.439µs       943.753µs       1.055165ms
100     1000    31.79µs         280.166µs       51.358µs        526.992µs       1.034306ms      2.47819ms
1000    10000   30.608µs        818.098µs       86.464µs        935.799µs       2.681115ms      10.595186ms
10000   100000  30.569µs        3.060826ms      64.132µs        6.56151ms       11.199984ms     64.855384ms

NoStatistics=true:

workers samples min             avg             50%             80%             90%             max
1       10      68.049µs        962.039µs       1.060335ms      1.064633ms      1.066087ms      1.066087ms
10      100     34.846µs        315.346µs       90.943µs        862.499µs       1.00516ms       1.08366ms
100     1000    31.45µs         225.53µs        36.88µs         236.63µs        939.115µs       1.466286ms
1000    10000   30.539µs        207.383µs       43.643µs        110.841µs       408.146µs       5.689001ms
10000   100000  30.488µs        152.603µs       39.636µs        90.622µs        145.266µs       9.28235ms

The default behavior is kept for compatibility. In future the option can be
extended to avoid collecting transaction statistics as well.

Now that stats is a pointer we can also revert a part of 26f89a595140f163a4e8a7c86b689990f6335788
and make the structure cleaner.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2025-06-12 13:41:35 +03:00
Benjamin Wang
8919474050
Merge pull request #983 from hwdef/bump-go-1244
Bump Go to 1.24.4
2025-06-12 11:14:29 +01:00
Benjamin Wang
3a492e34dd
Merge pull request #981 from gangli113/test
add page-size and initial-mmap-size flag to bbolt bench cmd
2025-06-12 10:07:20 +01:00
Benjamin Wang
736fd8f003
Merge pull request #982 from ivanvc/fix-arm64-workflow
Run ARM64 test workflow on Ubuntu ARM
2025-06-12 09:38:58 +01:00
hwdef
84f17a44e8 Bump Go to 1.24.4
Signed-off-by: hwdef <hwdefcom@outlook.com>
2025-06-12 16:32:32 +08:00
Gang Li
b5df4c6cd7 add page-size and initial-mmap-size flag to bench cmd
Signed-off-by: Gang Li <ganglica@google.com>
2025-06-11 17:05:49 +00:00
Ivan Valdes
e398240059
Run ARM64 test workflow on Ubuntu ARM
The test ARM64 workflow was running on a regular Ubuntu machine. Specify
the ARM suffix to ensure that the tests run on the ARM architecture.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-06-11 09:38:09 -07:00
Benjamin Wang
a129a9e960
Merge pull request #979 from ahrtr/20250610_changelog_1.4.1
Update changelog for v1.4.1
2025-06-10 17:21:52 +01:00
Benjamin Wang
fea0c9a840 Update changelog for v1.4.1
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-10 15:03:52 +01:00
Benjamin Wang
d378a0546a
Merge pull request #973 from nspcc-dev/drop-unused-txs-main
db: drop unused txs list
2025-06-10 10:00:01 +01:00
Roman Khimov
d18aaf8060 db: drop unused txs list
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>
2025-06-09 21:50:24 +03:00
Benjamin Wang
3e91289506
Merge pull request #971 from etcd-io/dependabot/go_modules/golang.org/x/sync-0.15.0
build(deps): Bump golang.org/x/sync from 0.14.0 to 0.15.0
2025-06-09 19:32:11 +01:00
Benjamin Wang
d6c2228ecb
Merge pull request #968 from ahrtr/20250605_large_object
Fix panicking being caused by huge object size
2025-06-09 19:31:05 +01:00
dependabot[bot]
d5b5bbcd8c
build(deps): Bump golang.org/x/sync from 0.14.0 to 0.15.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/sync/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 14:43:16 +00:00
Benjamin Wang
41ab04d21b
Merge pull request #966 from sxllwx/chore/export-raw-error
chore: use %w to wrap  returned err by unix funcs
2025-06-05 15:48:55 +01:00
Benjamin Wang
8f3c534f9a Move MaxMapSize and MaxAllocSize into internal/common
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-05 15:17:24 +01:00
Benjamin Wang
624e8a28c3 Add an unit test to reproduce the panick caused by huge value size
$ go test -run TestDB_HugeValue -v
seed: 44000
quick settings: count=5, items=1000, ksize=1024, vsize=1024
=== RUN   TestDB_HugeValue
--- FAIL: TestDB_HugeValue (0.06s)
panic: runtime error: slice bounds out of range [::268435459] with length 268435455 [recovered]
	panic: runtime error: slice bounds out of range [::268435459] with length 268435455

goroutine 7 [running]:
testing.tRunner.func1.2({0x1031ae420, 0x14000016090})
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1734 +0x1ac
testing.tRunner.func1()
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1737 +0x334
panic({0x1031ae420?, 0x14000016090?})
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/runtime/panic.go:792 +0x124
go.etcd.io/bbolt/internal/common.UnsafeByteSlice(...)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/internal/common/unsafe.go:26
go.etcd.io/bbolt/internal/common.WriteInodeToPage({0x14000104f80?, 0x1, 0x4?}, 0x14010210000)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/internal/common/inode.go:81 +0x288
go.etcd.io/bbolt.(*node).write(0x1400017a000?, 0x4001?)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/node.go:199 +0xa0
go.etcd.io/bbolt.(*node).spill(0x1400014e0e0)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/node.go:334 +0x1dc
go.etcd.io/bbolt.(*Bucket).spill(0x14000104f40)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/bucket.go:786 +0x278
go.etcd.io/bbolt.(*Bucket).spill(0x1400017a018)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/bucket.go:753 +0xc0
go.etcd.io/bbolt.(*Tx).Commit(0x1400017a000)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/tx.go:204 +0x260
go.etcd.io/bbolt.(*DB).Update(0x1031cdf90?, 0x1400007cf28)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/db.go:922 +0xc4
go.etcd.io/bbolt_test.TestDB_HugeValue(0x14000003c00)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/db_test.go:1560 +0x110
testing.tRunner(0x14000003c00, 0x1031c9ef0)
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1792 +0xe4
created by testing.(*T).Run in goroutine 1
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1851 +0x374
exit status 2
FAIL	go.etcd.io/bbolt	0.285s

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-05 14:33:25 +01:00
Benjamin Wang
a1ee7e4754
Merge pull request #903 from Elbehery/20250210-add-release-script
release: add release script
2025-06-04 13:11:55 +01:00
Mustafa Elbehery
6ab5f84f93 release: add release script
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-06-04 12:25:04 +02:00
wangxiang
2064f05473 chore: use %w to wrap returned err by unix funcs
Signed-off-by: wangxiang <scottwangsxll@gmail.com>
2025-05-22 14:01:18 +08:00
Benjamin Wang
8fcab37470
Merge pull request #963 from Elbehery/20250519-mmorel-35-staticcheck
fix staticcheck issues
2025-05-21 10:43:31 +01:00
Mustafa Elbehery
bf4a727b92 fix QF1004, QF1011, ST1006, ST1016 and ST1023 issues
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-19 23:25:26 +02:00
Benjamin Wang
c0f7c3c0ff
Merge pull request #959 from etcd-io/dependabot/github_actions/actions/setup-go-5.5.0
build(deps): Bump actions/setup-go from 5.4.0 to 5.5.0
2025-05-12 17:26:26 +01:00
dependabot[bot]
96234b3415
build(deps): Bump actions/setup-go from 5.4.0 to 5.5.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0aaccfd150...d35c59abb0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 14:16:52 +00:00
Benjamin Wang
c3550d92a4
Merge pull request #954 from mmorel-35/golangci-lint@v2
chore: bump golangci-lint to v2.1.6
2025-05-09 07:42:51 +01:00
Benjamin Wang
6b569fe5ac
Merge pull request #955 from Elbehery/20250507-bump-go-1.24.3
Bump Go to 1.24.3
2025-05-07 15:26:39 +01:00
Mustafa Elbehery
87e2705e38 Bump Go to 1.24.3
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-05-07 14:28:40 +02:00
Benjamin Wang
10f9a50714
Merge pull request #953 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.33.0
build(deps): Bump golang.org/x/sys from 0.32.0 to 0.33.0
2025-05-06 07:40:20 +01:00
dependabot[bot]
028d0897b3
build(deps): Bump golang.org/x/sys from 0.32.0 to 0.33.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.32.0 to 0.33.0.
- [Commits](https://github.com/golang/sys/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 18:26:46 +00:00
Benjamin Wang
cf12ecd310
Merge pull request #952 from etcd-io/dependabot/go_modules/golang.org/x/sync-0.14.0
build(deps): Bump golang.org/x/sync from 0.13.0 to 0.14.0
2025-05-05 19:25:35 +01:00
Matthieu MOREL
675a3be115 chore: bump golangci-lint to v2.1.6
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-05 18:02:36 +00:00
dependabot[bot]
7884034581
build(deps): Bump golang.org/x/sync from 0.13.0 to 0.14.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/sync/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 15:07:46 +00:00
Matthew Sainsbury
88d2b54695
add support for data file size limit (#929)
* add support for data file size limit
closes #928

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>

* respond to PR feedback

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>

---------

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>
2025-04-25 18:46:51 +01:00