mapbox / cardboard

tile indexed geo database interface.
ISC License
52 stars 10 forks source link

cardboard.put is not rejecting features based on their size #191

Closed mcwhittemore closed 7 years ago

mcwhittemore commented 7 years ago

This is something that got dropped with the move to Cardboard@3.0.0. Should it come back?

rclark commented 7 years ago

Actually it never should've rejected anything -- the user was able to set a limit on the maximum size of a feature that will be stored in DynamoDB, and larger than that feature data was stored on S3.

mcwhittemore commented 7 years ago

@rclark - yea, but now that we don't use s3, will this make it possible to write items to DynamoDB that you can't get out?

rclark commented 7 years ago

If you call cardboard.put on a feature that won't fit into dynamo, you'll get a DynamoDB error response handed back to you. So maybe the question is whether you want to just pass that back out or make cardboard's error types a part of its API contract.

mcwhittemore commented 7 years ago

Oh. Duh. DynamoDB won't let you write features that are too big. I think AWS errors are ok for Cardboard. If someone doesn't want them, they should validate feature size on their own end.