forked from TrueCloudLab/frostfs-s3-gw
[#661] Fix updating cache when request fails
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1a580b6fa4
commit
fdc926e70b
3 changed files with 17 additions and 6 deletions
|
@ -56,11 +56,13 @@ func (h *handler) PutBucketObjectLockConfigHandler(w http.ResponseWriter, r *htt
|
|||
return
|
||||
}
|
||||
|
||||
settings.LockConfiguration = lockingConf
|
||||
// settings pointer is stored in the cache, so modify a copy of the settings
|
||||
newSettings := *settings
|
||||
newSettings.LockConfiguration = lockingConf
|
||||
|
||||
sp := &layer.PutSettingsParams{
|
||||
BktInfo: bktInfo,
|
||||
Settings: settings,
|
||||
Settings: &newSettings,
|
||||
}
|
||||
|
||||
if err = h.obj.PutBucketSettings(r.Context(), sp); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue