Correct the three-outcome comment; keep doc comment attached to storeCover (#153)
This commit is contained in:
@@ -143,7 +143,6 @@ func (p *Poller) prefetchCover(ctx context.Context, sr store.Series) {
|
|||||||
// fill-only write for an ordinary pass, a write-through for a forced one
|
// fill-only write for an ordinary pass, a write-through for a forced one
|
||||||
// (issue #135). Every failure is logged against the Series and swallowed so
|
// (issue #135). Every failure is logged against the Series and swallowed so
|
||||||
// the chapter poll cannot see it.
|
// the chapter poll cannot see it.
|
||||||
|
|
||||||
func (p *Poller) storeCover(ctx context.Context, sr store.Series, sourceURL string) {
|
func (p *Poller) storeCover(ctx context.Context, sr store.Series, sourceURL string) {
|
||||||
bytes, contentType, err := fetchCoverBytes(ctx, sourceURL, p.CoverFetch, p.CoverBytesFetch)
|
bytes, contentType, err := fetchCoverBytes(ctx, sourceURL, p.CoverFetch, p.CoverBytesFetch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -157,9 +156,10 @@ func (p *Poller) storeCover(ctx context.Context, sr store.Series, sourceURL stri
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// The forced write replaces whether or not a Cover exists, and the row
|
// The forced write replaces whether or not a Cover exists, and the row
|
||||||
// then tells three outcomes apart: a blank filled, identical artwork
|
// then tells the three outcomes apart: a blank filled, identical artwork
|
||||||
// re-served — an honest no-op — or a replacement that strands previous,
|
// re-served — an honest no-op — or a replacement whose previous address
|
||||||
// which the next wave reclaims at this exact call site.
|
// is stranded: its bytes stay served under the covers table (ADR-0014),
|
||||||
|
// the row just no longer points at them.
|
||||||
previous, current, err := p.Store.ReplaceSeriesCover(sr.Site, sr.SeriesID, sourceURL, bytes, contentType)
|
previous, current, err := p.Store.ReplaceSeriesCover(sr.Site, sr.SeriesID, sourceURL, bytes, contentType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("latest poll %q: persist cover: %v", sr.Key(), err)
|
log.Printf("latest poll %q: persist cover: %v", sr.Key(), err)
|
||||||
|
|||||||
Reference in New Issue
Block a user