1353 Commits

Author SHA1 Message Date
Benjamin Wang
a0e5e3a1dd test: add more subcases to verify 'surgery-clear-elements' on branch page
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
8902ef92e9 resolve some minor review comments
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
a9a9356ea4 test: verify the left elements after clear-page-elements operation should have the same content
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
95576a4f10 CMD: add test cases for the 'surgery clear-page-elements' command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
3c3da590b1 CMD: add cobra style 'surgery clear-page-elements' command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
9832aff38a internal: add function ClearElements in surgeon package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-25 07:42:01 +08:00
Benjamin Wang
5a7a94e5cc
Merge pull request #434 from cenkalti/atomic
Fix progress reporting in bench cmd
2023-03-25 06:34:08 +08:00
Benjamin Wang
e921b67d8d
Merge pull request #438 from ahrtr/fix_unmap_error_20230323
update the error message when rollback unmap also fails
2023-03-24 17:11:06 +08:00
Cenk Alti
b5a219fd29 Fix progress reporting in bench cmd
Signed-off-by: Cenk Alti <alticen@amazon.com>
2023-03-23 21:37:19 -04:00
Benjamin Wang
e2c42548f2 update the error message when rollback unmap also fails
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-23 19:51:08 +08:00
Benjamin Wang
b027d19703
Merge pull request #433 from ahrtr/mlock_error_20230320
Perform unmap when mlock fails or both meta pages corrupted
2023-03-23 10:06:40 +08:00
Benjamin Wang
b2f3dd5dba Perform unmap when failing to mlock or both meta pages corrupted
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-22 12:02:01 +08:00
Benjamin Wang
d8ac759d4f test: add test cases to similate mlock failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 16:24:27 +08:00
Benjamin Wang
9c5eaa954d
Merge pull request #432 from etcd-io/dependabot/github_actions/actions/setup-go-4
Bump actions/setup-go from 3 to 4
2023-03-21 06:37:28 +08:00
dependabot[bot]
360067ce9e
Bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 15:06:32 +00:00
Benjamin Wang
925b8779d3
Merge pull request #431 from ahrtr/test_check_20230320
test: perform check in view (readonly) mode
2023-03-20 16:52:40 +08:00
Benjamin Wang
c00862aa7c test: add failpoint for mlock operation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-20 15:34:31 +08:00
Benjamin Wang
b91d901b74 test: perform check in view(readonly) mode
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-20 11:00:38 +08:00
Benjamin Wang
0c2c0a257a
Merge pull request #429 from tjungblu/fix_428
fixing small bench errors
2023-03-18 12:53:52 +08:00
Thomas Jungblut
3914515d4f Add test for the bench command
Also making sure the stdio buffers are thread safe.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-03-17 16:36:13 +01:00
Thomas Jungblut
44d4ec5416 fixing small bench errors
BenchResult locking was missing and when the read test was faster than a
second it would fail on a different count than expected.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-03-17 12:15:02 +01:00
Benjamin Wang
3f572b4de7
Merge pull request #426 from cenkalti/rebalance
Merge redundant codes in node.rebalance
2023-03-16 06:35:55 +08:00
Benjamin Wang
eb468cb5b5
Merge pull request #419 from cenkalti/freelist_hmap
modified freelist_hmap/hashmapGetFreePageIDs with better performance
2023-03-15 17:52:11 +08:00
Benjamin Wang
5c7326c1dd
Merge pull request #427 from ahrtr/update_check_20230315
bbolt: remove `CheckWithOptions` and add variadic parameter options to method `Check`
2023-03-15 17:10:59 +08:00
Benjamin Wang
87a178160f
Merge pull request #425 from ahrtr/move_inode_operation_into_common_20230315
move inode operations(read/write) into package internal/common
2023-03-15 16:26:51 +08:00
Benjamin Wang
e06ca0338c
Merge pull request #424 from ahrtr/refactor_surgery_util_20230315
cmd: move function `copyFile` into utils.go
2023-03-15 16:21:05 +08:00
Benjamin Wang
f7d0ed5185 bbolt: remove CheckWithOptions and add variadic parameter options to method Check
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-15 15:19:28 +08:00
Bin Guo
ef2d488d99 Merge redundant codes in node.rebalance
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-03-15 00:22:56 -04:00
mingtingzhang
c9c264c9d9 modified freelist_hmap/hashmapGetFreePageIDs with better performance
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-03-15 00:00:26 -04:00
Benjamin Wang
62f5a3f291 cmd: move function copyFile into utils.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-15 08:45:45 +08:00
Benjamin Wang
15d561e54f move inode operations(read/write) into package internal/common
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-15 08:44:19 +08:00
Benjamin Wang
0c81eede23
Merge pull request #423 from ahrtr/test_internal_20230314
test: run test cases under `./internal/...`
2023-03-14 18:24:11 +08:00
Benjamin Wang
44cddc6aaf test: run test cases under ./internal/...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-14 15:38:08 +08:00
Benjamin Wang
1ec2237d71
Merge pull request #420 from cenkalti/progress
display progress during benchmark
2023-03-14 12:45:45 +08:00
Benjamin Wang
a5e2643ca9
Merge pull request #421 from cenkalti/readme2
Add example for Bucket.Delete() in README.md
2023-03-14 12:44:07 +08:00
Sarthak
af055376f6
Add example for Bucket.Delete() in README.md
The example is similar to the examples for `Bucket.Put()` and `Bucket.Get()` functions, so it does not breaks the layout. Signed-off-by: Sarthak2143 <sarthaktomar2143@gmail.com> .

Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-03-13 23:14:42 -04:00
zhangsong
ab889e1dfa
display progress during benchmark
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-03-13 23:10:54 -04:00
Piotr Tabor
838586ae65
Merge pull request #416 from jmhbnz/master
Updated go to 1.19.7
2023-03-09 13:18:41 +01:00
James Blair
4e41eab093
Updated go to 1.19.7
Go 1.17 is out of support, this brings bbolt in line with other etcd maintained projects and addresses CVEs with older versions of golang.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-09 11:28:24 +13:00
Benjamin Wang
ef8fde548e
Merge pull request #415 from ahrtr/page_flags_20230308
Encapsulate the logic of checking the page type
2023-03-08 16:28:57 +08:00
Benjamin Wang
a3a9877de6 encapsulate the logic of checking the page type
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-08 10:47:59 +08:00
Piotr Tabor
17b18580c7
Merge pull request #407 from ahrtr/refactor_inode_20230215
Refactor: move inode to internal/common package
2023-03-06 18:07:54 +01:00
Piotr Tabor
1d1d7563f8
Merge pull request #414 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.6.0
Bump golang.org/x/sys from 0.5.0 to 0.6.0
2023-03-06 18:06:20 +01:00
dependabot[bot]
3be1fef0d3
Bump golang.org/x/sys from 0.5.0 to 0.6.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.5.0...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 15:11:52 +00:00
Benjamin Wang
f68adfee81 CMD: update leafPageElement to return both key and value directly
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-04 04:58:53 +08:00
Benjamin Wang
852b1df32f refactor: move inode to internal/common package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-04 04:22:09 +08:00
Benjamin Wang
ea511567eb refactor both bolt and guts_cli based on the common package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-04 04:22:09 +08:00
Benjamin Wang
34595e7231 create a common package
Points:
1. There are lots of duplicated definitions between bolt and
   guts_cli, which is definitely not good.
2. The implementation in guts_cli also has issue, please
   refer to https://github.com/etcd-io/bbolt/issues/391.
   This refactoring can fix the issue.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-04 04:22:09 +08:00
Benjamin Wang
1273ac779e
Merge pull request #412 from etcd-io/dependabot/go_modules/github.com/stretchr/testify-1.8.2
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
2023-02-28 06:25:18 +08:00
dependabot[bot]
2e25261ce0
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 15:12:40 +00:00