mapbox / mapbox/tilelive-s3

putTile should not fail if initial GET times out

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16
Forks
22
PR merge metrics
No merged PRs in 30d

Description

In a couple of high-write applications (e.g. https://github.com/mapox/mapbox-tile-copy), we're seeing a lot of failed `putTile` requests where the failure traces to [5s timeouts on the GET request](https://github.com/mapbox/tilelive-s3/blob/afb89f0870babd246f17c081ad6859c8197cdc5f/lib/index.js#L401) that we make in order to compare buffers before doing an S3 PUT.

To me it seems that this is unnecessary, and that really **any** failure of the GET request within a `putTile` ought to be silently ignored. The buffer check is an optimization for minimizing PUT I/O and $$$ costs that shouldn't be allowed to cause :fire:.

cc @yhahn @GretaCB

Contributor guide

Open the contributing guide

Research direction

Review lib/index.js around line 401 and trace the GET used by putTile before the S3 PUT. Confirm the behavior for a GET timeout or other GET failure, then verify that putTile still proceeds with the write instead of failing because the comparison request failed.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
backend, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.