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

Make registerSafe more threadsafe. #26

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

j-baker
Copy link
Contributor

@j-baker j-baker commented Jun 1, 2017

Before, we'd see a bunch of our Spark tasks attempt to register the same
metrics concurrently and throw and get retried (the first time).

Now, it is threadsafe to call registerSafe from multiple threads

Before, we'd see a bunch of our Spark tasks attempt to register the same
metrics concurrently and throw and get retried (the first time).

Now, it is threadsafe to call registerSafe from multiple threads
@schlosna
Copy link
Contributor

schlosna commented Jun 1, 2017

Talked through this with James and his use seems reasonable, though in most cases where there would be multiple threads registering metric under same name, you probably wouldn't want that as you effectively get last-write-wins semantics.

@schlosna schlosna merged commit eeb159f into palantir:develop Jun 1, 2017
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

Successfully merging this pull request may close these issues.

2 participants