@@ -551,9 +551,14 @@ func (cfg *Config) updateARI(ctx context.Context, cert Certificate, logger *zap.
551551 cfg .certCache .mu .Lock ()
552552 updatedCert , ok = cfg .certCache .cache [cert .hash ]
553553 if ! ok {
554+ // cert is no longer in the cache; this can happen for several reasons (past expiration,
555+ // rejected by on-demand permission module, random eviction due to full cache, etc), but
556+ // it probably means we don't have use of this ARI update now, so while we can return it
557+ // to the caller, we don't persist it anywhere beyond that...
554558 cfg .certCache .mu .Unlock ()
555- updatedCert = cert // return input cert, not an empty one
556- logger .Debug ("obtained ARI update, but certificate no longer in cache; discarding ARI update" ,
559+ updatedCert = cert // return input cert, not an empty one
560+ updatedCert .ari = newARI // might as well give it the new ARI for the benefit of our caller, but it won't be updated in the cache or in storage
561+ logger .Debug ("obtained ARI update, but certificate no longer in cache; ARI update will be returned to caller, but not stored" ,
557562 zap .Time ("selected_time" , newARI .SelectedTime ),
558563 zap .Timep ("next_update" , newARI .RetryAfter ),
559564 zap .String ("explanation_url" , newARI .ExplanationURL ))
0 commit comments