Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

#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

  1. Start a workflow that writes data to a model (e.g. a workflow with multiple steps writing to a command/shell model)
  2. While the workflow is running, attempt to delete all versions of that data:
    swamp data delete <model> <data_name> --force
  3. 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 --json output 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
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 7 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

5/5/2026, 12:37:37 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/5/2026, 11:30:51 AM

Sign in to post a ripple.