-
-
Notifications
You must be signed in to change notification settings - Fork 735
Possible data caching issue #282
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
Comments
Update: I'm attaching some screenshots, one of which shows the ParseObject after the query. The value we changed here is in the field Setting, its a subvalue (of the json map) called taxRate.
The value our code gets is 20 (old). Our code ends up calling ParseObject.getJsonObject which accesses estimatedData:
Note: we tried calling fetch() on the objects individually, that didn't fix the issue, it also didn't change the value in either estimatedData nor serverData.   |
This seems to be due to the way we handle This was desired behavior with mutable containers, but shouldn't be necessary anymore and can remove the caching functionality which will resolve any issues with For now, you can use |
Great, I will try that work around. Looks like the bug has been around for a while. It really surprised me seeing that the object had just been fetched that it would return old data. :( |
It's not really a bug, so I've moved it to "enhancement". It's also not returning "old" data, but dirty data. |
Hmm, I'm not sure what you mean. I updated the value, pulled the object, How is that not a bug? On Tue, Dec 15, 2015 at 4:55 PM, Grantland Chew [email protected]
|
If I update the object a 2nd time, then get it again, then it returns the
|
This has been working as expected for years. This functionality has only recently become obsolete with the removal of mutable containers. |
How is it expected that after fetching an object that this method returns I haven't read the docs, but it seemed the intention of these methods was
|
I took a quick look at the source for
|
If you only used |
I haven't got up to speed on how your SDK works here regarding dirty, converting etc. I'm just saying that in the screenshots above we see that estimatedData doesn't have the current values, so I am wondering if getMap which uses estimatedData will suffer the same problem? |
Here is the source for getJsonObject, it looks similar to getMap?
|
Let me explain this again...
If you have more questions, please refer to the implementation since it's the source of truth for most of these things. |
Also, you mentioned dirty data several times. Which step(s) in the repro
|
While i appreciate the detailed explanation, I don't have time to learn how I just want to get the current values. You said initially that I should I'm happy to do that. If I do that, will I get the current values? I'm only asking for confirmation because a quick look at the screenshot If you just confirm that after switching to getMap I'll get current data
|
I worked around this issue by switching to getMap() and getList() as you suggested. |
Awesome, it should also no longer occur with #303 |
I'm running into a strange issue, and I was wondering if you could offer any initial insights/intuitions while I look into it further. We're using Android Parse SDK 1.11.0.
High level repro steps:
More details:
a. We can repro this when Device 2 is Android and Device 1 is Android, we can also repro this when Device 2 is Android and device 1 is iOS. We cannot repro this if device 2 is iOS. I think this tells us its likely a bug in the Android SDK (assuming iOS SDK behaviour is correct)
b. The code used in Step 2 to get the object from parse is like this:
c. We can't repro this issue for primitive fields, like a string. So, for example, if on Device 1 you change a JSON field and a primitive field, then, when Device 2 gets the object using the query it will have the updated primitive field value, but not the updated JSON field value.
d. We tried reproing this by making manual changes at parse.com, and we haven't yet been able to repro the problem this way. Summarizing: if we make the changes using the Android SDK or the iOS SDK then we can repro the problem.
We're going to try calling ParseObject.fetchInBackground for each object in the query results to see if that works around the issue.
My expectation was that after calling
ParseQuery.findInBackground
and then callingParseQuery.getResult
that the resulting ParseObjects would have current data in them matching what is at parse.comThe text was updated successfully, but these errors were encountered: