amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.09k stars 1.16k forks source link

Chained 'deep' put not working if localStorage disabled & peer listed on data that can't be found #941

Open Dletta opened 4 years ago

Dletta commented 4 years ago

What to do:

Expected behavior:

Log key and object with id of child LOG:: org {_:{...}, employeeNo:#12j1j12h3jk3j43}

What I get instead

LOG:: org undefined

amark commented 4 years ago

This only fails because of localStorage: false, correct needs to get fixed, issue here (and with jabis' nodejs version of it) is for deep writes GUN does a read before a write & if reads are "not found" it waits until all peers have replied... to make things not buggy, I assume "me" is 1 of those peers, so if "me" (localStorage) fails to reply, it only gets 1 (not 2) acks and then... never resolves.

Possibly with the changes I've made to make souls more predictable I can eliminate this more "networky dependent behavior" as yeah networks are always dangerous/bad

for now localStorage.clear() start of app (or in setInterval) and keep storage turned on.

Dletta commented 4 years ago

okay testing with localStorage left true and will report back

Dletta commented 4 years ago

localStorage true is working as workaround