← Back to list
01Issue
BugShippedSwamp CLIPublicEnterprise
Assigneesstack72
Relationships
#234 data delete fails with "Directory not empty (os error 39)" when concurrent writes are active
Opened by webframp · 5/5/2026· Shipped 5/5/2026
Summary
swamp data delete <model> <data_name> --force fails with os error 39 (Directory not empty) when another process (e.g. a running workflow) is concurrently writing new versions to the same data artifact.
Steps to Reproduce
- Start a workflow that writes data to a model (e.g. a workflow with multiple steps writing to a
command/shellmodel) - While the workflow is running, attempt to delete all versions of that data:
swamp data delete <model> <data_name> --force - The delete acquires the lock, begins removing versions, but new files appear between deletion and directory removal
Expected Behavior
The delete should either:
- Retry the rmdir after a brief pause
- Skip newly-created versions and report partial deletion
- Document that concurrent deletes are best-effort
Actual Behavior
FTL error Error: "Directory not empty (os error 39): remove '/path/to/.swamp/data/.../log'"Notes
- Deleting a specific version (
--version N --force) works correctly even under concurrent writes - Deleting all versions works correctly when no concurrent process is writing
- The
--jsonoutput mode for successful deletes is clean:{modelId, modelName, dataName, versionsDeleted} - Error messages for non-existent data/model/version are clear and helpful
Environment
- CLI: 20260504.233645.0-sha.430c1535
- OS: Linux x86_64
02Bog Flow
Shipped
Click a lifecycle step above to view its details.
03Sludge Pulse
Sign in to post a ripple.