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?
to your account
Adam Rinehart opened DATAMONGO-305 and commented
In the org.springframework.data.mongodb.core.query.Query class, the sort() and fields() methods are synchronizing on this, before initializing and returning the sort and fields attributes.
But in addCriteria(), it is making unsynchronized access to a LinkedHashMap to store the criteria in. Because of this, it seems like this class is not intended to be thread-safe.
Using synchronized in a class that is not thread-safe can cause a performance bottleneck, and should be removed
Affects: 1.0 M5
Reference URL: http://forum.springsource.org/showthread.php?116411-Mongo-Query-object-why-are-sort()-amp-fields()-synchronized
Referenced from: commits b26bb62
The text was updated successfully, but these errors were encountered:
No branches or pull requests