Skip to content

Conversation

@bjornarjatten
Copy link

✅ Summary

This PR addresses a potential data race in ContentProviderDatabaseDriver#getTableNames. The method lazily initializes mTableNames, which can lead to race conditions if accessed concurrently by multiple threads. While other methods reading this field may be benign, concurrent execution of getTableNames could result in initialization errors.

🔧 Changes Made

Marked getTableNames(ContentProviderDatabaseDescriptor) as synchronized to ensure thread-safe lazy initialization of mTableNames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants