Commit 00ffc6a
Zhang Wenhao
<refactor>[kvm]: move VM host file cleanup to new extension point
Migrate VM host file cleanup from VmInstanceDestroyExtensionPoint
to VmJustBeforeDeleteFromDbExtensionPoint. This ensures VmHostFileVO
and VmHostBackupFileVO records are deleted before VM is removed
from database.
Changes:
- Replace VmInstanceDestroyExtensionPoint with
VmJustBeforeDeleteFromDbExtensionPoint
- Remove unnecessary destroy lifecycle methods
- Use SQLBatch for atomic deletion of both file records
- Update Spring configuration in both production and test
Resolves: ZSV-11436
Related: ZSV-11310
Change-Id: I6b766c6e757971796b696e6f7265766e766168711 parent a3e3214 commit 00ffc6a
3 files changed
Lines changed: 17 additions & 25 deletions
File tree
- conf/springConfigXml
- plugin/kvm/src/main/java/org/zstack/kvm/efi
- test/src/test/resources/springConfigXml
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
Lines changed: 15 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
701 | 703 | | |
702 | 704 | | |
703 | 705 | | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 706 | + | |
715 | 707 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
727 | 719 | | |
728 | 720 | | |
729 | 721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
0 commit comments