- Notifications
You must be signed in to change notification settings - Fork 476
Closed
Labels
Description
When I run the toPOJO
method from the InfluxDBResultMapper
in a multithreaded environment, some fields of the objects returned are null in some special cases.
Then I debugged and figured out that there is some problem in the cacheMeasurementClass
method. When the first thread puts the measurement class into the cache map CLASS_FIELD_CACHE
and before it finish putting all the field of the measurement class into cache, other threads would get an incomplete cache object.
I think it‘s better to make it synchronized or move the step of putting the measurement class into the cache map to the end, at least after all the field of the measurement class cached.