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

fix double check lock on cluster manager #457

Merged

Conversation

suryanshagnihotri
Copy link
Contributor

No description provided.

@@ -110,7 +110,7 @@

protected static Cache<String, FileMetadata> fileMetadataCache;
private static LoadingCache<String, FileInfo> fileInfoCache;
protected ClusterManager clusterManager;
protected volatile ClusterManager clusterManager;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please describe the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see usecase similar to this comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, if possible can we go with early initialization as mentioned in some other links?

Using volatile may have adverse performance implications. So, if we can avoid it may be by creating a rubix config to tell it before starting the cluster type and then we do an early initialization. This way we may get rid of double lock check pattern.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont have a good way of initializing objects in rubix because of they way rubix integrates with engine. It gets added as a library and there is no separate initialisation phase for rubix. It is possible in embedded mode where there is a initialisation phase but not generally.
I will merge this change, in case you have ideas about doing it the other way please open a new issue.

@shubhamtagra shubhamtagra merged commit 16c2e1e into qubole:master Sep 29, 2020
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.

3 participants