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

emitter.AssignPathContext not thread-safe #5

Closed
thisisaaronland opened this issue Oct 2, 2021 · 1 comment
Closed

emitter.AssignPathContext not thread-safe #5

thisisaaronland opened this issue Oct 2, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@thisisaaronland
Copy link
Member

More specifically context.WithValue does not return a new context but rather "returns a copy of parent" which means that it's possible for the path (associated with a context) will get changed before the filehandle associated with it has been processed.

For example:

2021/10/01 23:52:48 WTF /usr/local/data/sfomuseum-data-flights-2021-09/data/174/635/409/7/1746354097-alt-swim-path.geojson
2021/10/01 23:52:48 WTF 2 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/635/409/7/1746354097-alt-swim-path.geojson
2021/10/01 23:52:48 WTF /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF 2 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF 2 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF 3 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF 4 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 WTF 3 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 time to index paths (1) 10.384281109s
2021/10/01 23:52:48 WTF 4 /usr/local/data/sfomuseum-data-flights-2021-09/data/174/636/001/1/1746360011.geojson
2021/10/01 23:52:48 Failed crawl callback for /usr/local/data/sfomuseum-data-flights-2021-09/data/174/635/409/7/1746354097-alt-swim-route.geojson: /usr/local/data/sfomuseum-data-fligh\
ts-2021-09/data/174/636/001/1/1746360011.geojson is missing flysfo:date
@thisisaaronland thisisaaronland added the bug Something isn't working label Oct 2, 2021
@thisisaaronland thisisaaronland self-assigned this Oct 2, 2021
@thisisaaronland
Copy link
Member Author

There is no "fixing" this short of changing the underlying interfaces so now there is a v2 release.

https://github.com/whosonfirst/go-whosonfirst-iterate/releases/tag/v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant