fix: use full Lock in State.Save() to prevent data race (closes #17) #20
Reference in New Issue
Block a user
Delete Branch "fix/state-save-data-race"
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?
State.Save() was using RLock but mutating s.snapshot.LastUpdated, which is a write operation. Changed to full Lock.
make check passes.
checks not passing
Investigated this. PR #20 has already been merged into main.
Ran
make checkon main:The data race fix itself (using full
Lock()instead ofRLock()inState.Save()) is correct and merged. If checks are still failing in CI, the issue is likely resolver test timeouts in the CI environment — happy to open a separate issue and fix for that.