Skip to content

preload_adjacent_bins option generates coordinates for adjacent bins even if include_coordinates is False #461

@joefutrelle

Description

@joefutrelle

if preload_adjacent_bins:
if previous_bin is not None:
previous_bin.mosaic_coordinates(shape=mosaic_shape, scale=mosaic_scale, block=False)
if next_bin is not None:
next_bin.mosaic_coordinates(shape=mosaic_shape, scale=mosaic_scale, block=False)

The intent of include_coordinates and having it default to False is to prevent an /api/bin request from starting a mosaic coordinates job unless the UI needs it to. But preload_adjacent_bins computes mosaic coordinates for adjacent bins regardless, and so clients like scrapers that hit /api/bin with include_coordinates set to False and preload_adjacent_bins set to True are still placing undue load on the server.

The most expedient solution is to expand the meaning of include_coordinates so that it takes precedence over preload_adjacent_bins and will prevent preloading when it's set to False.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions