Commit 5df2a8f
authored
[Disk Manager] fix idempotence of sync deletion of non-existent disk (#5157)
If we delete non-existent disk twice using `sync` flag, then the second
deletions ends with an error:
```
disk_service_test.go:1275:
Error Trace: /-S/cloud/disk_manager/internal/pkg/facade/disk_service_test/disk_service_test.go:1275
/-S/cloud/disk_manager/internal/pkg/facade/disk_service_test/disk_service_test.go:1285
Error: Received unexpected error:
rpc error: code = Unknown desc = Non retriable error, Silent=false: unknown zone "", available zones: ["zone-a" "zone-b" "zone-c" "no_dataplane" "zone-d" "zone-d-shard1"]
```
Errors occures here, in `setEstimate`:
https://github.com/ydb-platform/nbs/blob/main/cloud/disk_manager/internal/pkg/services/disks/delete_disk_task.go#L216
- After the first deletion tombstone is insterted into the database
- On the second deletion, we call GetDiskMeta here
https://github.com/ydb-platform/nbs/blob/main/cloud/disk_manager/internal/pkg/services/disks/delete_disk_task.go#L206
and get a tombstone.
- The tombstone has empty zone id, so we can't create a Blockstore
client with empty zone.1 parent 1882cff commit 5df2a8f
File tree
2 files changed
+46
-1
lines changed- cloud/disk_manager/internal/pkg
- facade/disk_service_test
- services/disks
2 files changed
+46
-1
lines changedLines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
0 commit comments