MaxServ / t3ext-fal_s3

S3 driver for FAL
GNU General Public License v2.0
13 stars 10 forks source link

[BUGFIX] - Only update storage metadata in case of changes #52

Closed arnoschoon closed 5 years ago

arnoschoon commented 5 years ago

This patch adds a check if the local cache-control directive isn't already set remotely so we can skip copyObject. This should fix the race condition discussed in https://github.com/MaxServ/t3ext-fal_s3/issues/49

arnoschoon commented 5 years ago

Hi @maechler

As discussed this should relieve the pressure a bit, the behavior in https://github.com/MaxServ/t3ext-fal_s3/issues/49 should be more controlled after merging this patch.

I hope that you and maybe some of my coworkers like @rvollebregt and @DerFrenk can test this.

maechler commented 5 years ago

@arnoschoon Looks good to me, but I will test it next week.

maechler commented 5 years ago

Seems to work as expected! Thanks to the condition !empty($cacheControl) it even works in a setup where the Cache-Control headers are already set by lambda functions.