Skip to content

fix(file_system): improve lock error message by adding PID and OS error details#450

Merged
adsharma merged 2 commits intoLadybugDB:mainfrom
ksmeltzer:fix/confusing-lock-error
May 4, 2026
Merged

fix(file_system): improve lock error message by adding PID and OS error details#450
adsharma merged 2 commits intoLadybugDB:mainfrom
ksmeltzer:fix/confusing-lock-error

Conversation

@ksmeltzer
Copy link
Copy Markdown
Contributor

@ksmeltzer ksmeltzer commented May 3, 2026

Description

Improves the lock error message when a process cannot acquire a lock on the database files by adding the blocking process ID (PID) and OS error details to the POSIX lock failure messages using fcntl(F_GETLK). Adds posixErrMessage() or GetLastError() details directly to the lock failure messages to make debugging easier.

This fixes confusing lock errors where users could not identify what process was holding the LadybugDB database lock.

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Documentation Update

Checklist

  • I have changed storage version if on disk format has changed.
  • I have requested a review from a maintainer.
  • I have updated the documentation (if needed).

@ksmeltzer ksmeltzer force-pushed the fix/confusing-lock-error branch from e2de2ad to 5af6624 Compare May 3, 2026 15:22
@ksmeltzer
Copy link
Copy Markdown
Contributor Author

All checks have passed! Could a maintainer please take a look when you have a moment? cc @benjaminwinger

Copy link
Copy Markdown
Contributor

@adsharma adsharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just one comment.

Comment thread src/common/file_system/local_file_system.cpp
@ksmeltzer ksmeltzer requested a review from adsharma May 4, 2026 16:55
@adsharma adsharma merged commit d87a318 into LadybugDB:main May 4, 2026
4 checks passed
@adsharma
Copy link
Copy Markdown
Contributor

adsharma commented May 4, 2026

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants