Repository navigation
Conversation
| image.SizeBytes = int64(len(data)) | ||
| image.UpdatedAt = now.Format(time.RFC3339) | ||
|
|
||
| if _, err := s.repository.Update(image); err != nil { |
There was a problem hiding this comment.
Image data and image metadata are stored separately. The metadata update happens before the blob write here, so a future durable data store may need transactional handling if partial failures become important.
| return nil | ||
| } | ||
|
|
||
| func (s *Service) StageData(id string, data []byte) error { |
There was a problem hiding this comment.
StageData intentionally leaves the image in uploading state while storing the staged bytes. ImportData below is the separate compatibility step that marks the image active.
| return err | ||
| } | ||
|
|
||
| func (s *Service) DownloadData(id string) ([]byte, error) { |
There was a problem hiding this comment.
Download checks image existence before reading data. That keeps missing image semantics separate from missing blob semantics in the data repository.
6c507e9 to
9ee66c6
Compare
264e59a to
7864e35
Compare
|
Closing without merge. The repository was reset to a new root that keeps only the retained design decisions (see |
Summary
Main Review Points
Verification