remotestorage.js icon indicating copy to clipboard operation
remotestorage.js copied to clipboard

update local version of containing folder when a new items comes in from remote

Open michielbdejong opened this issue 11 years ago • 11 comments
trafficstars

When a folder listing is fetched, and we become aware of items that exist remotely but not locally, the entry in node.local.itemsMap is set to false. This is good because it means when you do getListing, you only see items that actually exist in the cache.

However, when such an item is then later fetched, its entry in the containing folder's node.local.itemsMap should be changed from false to true, and we're not currently doing that.

michielbdejong avatar Sep 12 '14 15:09 michielbdejong

PS: a false entry in the local itemsMap can also indicate a local deletion. The way to distinguish them is that for unfetched items, no node exist, whereas for deleted items a node exists for the item itself with a common version still containing the content that was deleted, and then a local version with body false. This node is then removed when the DELETE request is sent, and after that the updated folder will be fetched with a GET. So there it al works correctly.

michielbdejong avatar Sep 12 '14 15:09 michielbdejong

Next step:

  • [ ] Write failing test

raucao avatar Dec 10 '14 15:12 raucao

This is marked as blocker, but I think nobody currently understands the actual implications of the wrong behaviour, and yet we really want to release a new stable version with all the bugfixes since 0.11.0. @michielbdejong Do you think we should not release without fixing this? Or can we keep the blocker label, but at least release 0.11.1 to get all the other fixes out?

raucao avatar Jan 23 '15 00:01 raucao

Yes, congrats on the 0.11.1 release! Ping me when you or someone else has time to pair on this one.

michielbdejong avatar Jan 24 '15 09:01 michielbdejong

Unfortunately, our Internet connection here on Dominica is not sufficient for remote pairing.

raucao avatar Jan 24 '15 17:01 raucao

Hey @michielbdejong, I thought I remembered that, on our last call, you said you'd make some unit tests to illustrate the issue, do you think you'll have some time to do that soon?

silverbucket avatar Jan 24 '15 18:01 silverbucket

Yer, that would explain it to the person who wants to fix it then.

raucao avatar Jan 24 '15 19:01 raucao

Yes, but we'll do that as part of the pairing session. And then immediately fix it while we're at it. Let me know as soon as someone has time.

michielbdejong avatar Jan 25 '15 17:01 michielbdejong

If you just write a test, someone can pick it up and fix it without pairing. As I said, Internet connection here is not sufficient for remote pairing.

Edit: or it'll have to wait until mid February.

raucao avatar Jan 25 '15 18:01 raucao

@skddc do you want to pair on this now?

michielbdejong avatar Mar 13 '15 10:03 michielbdejong

I can pair on this now.

raucao avatar Mar 19 '16 21:03 raucao