Commit e86ca15
committed
Fix scheduling metadata to use loaded headers
When templates are loaded via GetTemplate, the memfileHeader and rootfsHeader
SetOnce fields were initialized with nil values. Although Fetch() would load
the actual headers from storage via NewStorage(), these loaded headers were
never propagated back to the SetOnce fields. This caused SchedulingMetadata()
to always return nil for templates loaded through the normal path.
The fix updates the SetOnce fields with the loaded headers from the Storage
objects after they are successfully created, but only when the initial header
was nil.1 parent 8375d6e commit e86ca15
1 file changed
Lines changed: 12 additions & 0 deletions
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
246 | 258 | | |
247 | 259 | | |
248 | 260 | | |
| |||
0 commit comments