mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #1879] [MERGED] refactor: open boltdb only while using it #2168
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/1879
Author: @ChristopherHX
Created: 6/25/2023
Status: ✅ Merged
Merged: 7/10/2023
Merged by: @mergify[bot]
Base:
master← Head:boltdb-lock-in-handler📝 Commits (10+)
a87f85frefactor: open boltdb only while using it2c42fffpatch2edba96Update handler_test.godc86141Update handler_test.gob874083Update handler_test.goafe0e8eUpdate handler.go2119a66timeout * 10c937f87Merge branch 'master' into boltdb-lock-in-handler5911237pr feedback8b995f8fixup📊 Changes
2 files changed (+83 additions, -42 deletions)
View changed files
📝
pkg/artifactcache/handler.go(+79 -40)📝
pkg/artifactcache/handler_test.go(+4 -2)📄 Description
I don't know anything about boltdb, but running two act instances with the same bolt database returns after 5s with error timeout.
My proposal is open the db on demand. Additionally close the db during download, upload and commit to reduce hitting a 5s timeout due to large caches.
Do you know any other solution?
This might have a negative impact for a single act instance, due to additional open and close calls.
Does boltdb have any problem when calling Close() twice? If so we need to disable the defered Close() after calling it.
Timeout is now 50s to allow using cache in parallel on slower devices, since database locks might take longer.Closes #1825
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.