11100: Add comment about delete_at validation race.
authorTom Clegg <tom@curoverse.com>
Thu, 30 Mar 2017 21:11:05 +0000 (17:11 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 30 Mar 2017 21:11:05 +0000 (17:11 -0400)
services/api/app/models/container_request.rb

index f7829a54c725ccfa95d844b1e8a4d180481cbb9f..edd69d0b08fb00246126ffe58fad0fa000ee85bc 100644 (file)
@@ -109,6 +109,8 @@ class ContainerRequest < ArvadosModel
         end
         if self.output_ttl > 0
           trash_at = db_current_time + self.output_ttl
+          # delete_at cannot be sooner than blob_signature_ttl, even
+          # after the delay between now and the collection validation.
           delete_at = db_current_time +
                       [self.output_ttl,
                        Rails.configuration.blob_signature_ttl + 60].max