Add the content field to FileInfo (#15749)
* Add the content field to FileInfo * Fixing the upgrade code * Trying to fix the text-scheme * Fixing test-schema * Fixing test-schema * Moving the migration to the next version
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9bff309dd0
Коммит
24621a22ed
@@ -3336,6 +3336,26 @@ func (s *RetryLayerFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, e
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerFileInfoStore) SetContent(fileId string, content string) error {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
err := s.FileInfoStore.SetContent(fileId, content)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerFileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
|
||||
tries := 0
|
||||
|
||||
Ссылка в новой задаче
Block a user