Skip to content

fix leftover temporary volume record after template from snapshot - #14857

Open
Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:adaptive-temp-volume-cleanup
Open

Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:adaptive-temp-volume-cleanup

Conversation

@Damans227

Copy link
Copy Markdown
Collaborator

Fixes #14856

Creating a template from a snapshot on FlashArray leaves the temporary volume's database record behind. The temporary volume is deleted on the array, but its record stays Allocated and keeps counting against the pool. The failure path already removes the record, the success path didnt. This removes it after the copy too, and moves the cleanup into its own method.

Test:

Create a data volume on a FlashArray pool, attach it, snapshot it, create a template from the snapshot, check the .TMP volumes.

Before: the temporary volume record stays.

| 45 | fc-vm4_fix15-test_20261125172935_1795627777483.TMP | Allocated | NULL |

before-record-left

After: the record is removed right after the copy.

| 46 | fc-vm4_fix15-test_20261125174001_1795628403940.TMP | Allocated | 2026-11-25 17:40:27 |

Both temporary volumes are destroyed on the array:

> purevol list --pending-only
cs-prim-fc-p1::vol-3-1-2-45-20261125173005   1G   23:47:32
cs-prim-fc-p1::vol-3-1-2-46-20261125174027   1G   23:57:54

after-record-removed

Also added unit tests for the cleanup removing the record, including when the array delete fails.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.34%. Comparing base (6489766) to head (f795aa4).

Files with missing lines Patch % Lines
...torage/motion/StorageSystemDataMotionStrategy.java 76.92% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14857   +/-   ##
=========================================
  Coverage     18.34%   18.34%           
+ Complexity    16669    16667    -2     
=========================================
  Files          5939     5939           
  Lines        537819   537827    +8     
  Branches      65941    65941           
=========================================
+ Hits          98638    98640    +2     
- Misses       427960   427967    +7     
+ Partials      11221    11220    -1     
Flag Coverage Δ
uitests 4.08% <ø> (ø)
unittests 19.43% <76.92%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Damans227
Damans227 marked this pull request as ready for review November 25, 2026 18:26

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant