etcd-io / bbolt

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

[1.3] tests/robustness: switch to kill if no panic after 10sec #817

Closed fuweid closed 3 months ago

fuweid commented 3 months ago

If file doesn't grow in 10 sec, bbolt won't trigger the following errors:

We should switch to kill instead of waiting for panic. In order to trigger these errors, we should increase value size to 512.

(cherry picked from commit 49eb212fa8ab67709ea460df01982504cf7fa4a1)

Fixes: https://github.com/etcd-io/bbolt/pull/816#issuecomment-2277495452

fuweid commented 3 months ago

ping @ahrtr @tjungblu

tjungblu commented 3 months ago

/lgtm

ahrtr commented 3 months ago

Thanks for the quick fix.

Do you know why your PR https://github.com/etcd-io/bbolt/pull/816 did not fail, but the release-1.3 failed after merging your PR?

fuweid commented 3 months ago

Thanks for the quick fix.

Do you know why your PR #816 did not fail, but the release-1.3 failed after merging your PR?

The failpoint was randomly picked and some failpoints only trigger panic during resizing. If the test hit the timing, it will pass. If not, it won't panic in 10 seconds. This patch is to force to kill the process if it's not panic in time.

ahrtr commented 3 months ago

The failpoint was randomly picked and some failpoints only trigger panic during resizing

thx for the clarification.

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ahrtr, fuweid

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/etcd-io/bbolt/blob/release-1.3/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment