[MM-48946] Fix read after write issue when uploading data (#21868)

* Fix read after write issue when uploading data

* Prefer request.CTX interface
Этот коммит содержится в:
Claudio Costa
2022-12-13 11:47:05 -06:00
коммит произвёл GitHub
родитель 68373e992b
Коммит 6fd174a95f
13 изменённых файлов: 45 добавлений и 34 удалений

Просмотреть файл

@@ -9549,10 +9549,10 @@ func (s *TimerLayerUploadSessionStore) Delete(id string) error {
return err
}
func (s *TimerLayerUploadSessionStore) Get(id string) (*model.UploadSession, error) {
func (s *TimerLayerUploadSessionStore) Get(ctx context.Context, id string) (*model.UploadSession, error) {
start := time.Now()
result, err := s.UploadSessionStore.Get(id)
result, err := s.UploadSessionStore.Get(ctx, id)
elapsed := float64(time.Since(start)) / float64(time.Second)
if s.Root.Metrics != nil {