Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review map token expiration renewal code #187

Open
strk opened this issue May 16, 2014 · 1 comment
Open

Review map token expiration renewal code #187

strk opened this issue May 16, 2014 · 1 comment

Comments

@strk
Copy link
Contributor

strk commented May 16, 2014

There might be a possible race condition between an expiring map token key and a renewal happening close to expiration. If the code reading the token from redis happens to run before the code renewing the expiration, a "map token not found" error would be triggered at map creation.

Possible reason for the race condition:
https://github.com/CartoDB/Windshaft/blob/0.21.0/lib/windshaft/mapstore.js#L133

See https://groups.google.com/forum/#!topic/cartodb/9TfRcqpuPH4

\cc @rochoa, @javisantana

@strk
Copy link
Contributor Author

strk commented May 16, 2014

A possible way to test this could be to set serverOptions.grainstore.default_layergroup_ttl to a very low number and create the same map with a frequency close to the expiration time (not easy!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant