Use `arc` not `/arc` & if no data on start then use workaround
@mitra42 just a summary of our debug session to remember to do after the Archive event:
Querying on /arc doesn't work, but arc does.
You found a race-condition in GUN that on an empty database this line
https://github.com/internetarchive/dweb-transport/blob/master/gun/gun_https_hijackable.js#L34-L35 will return an undefined soul, but if database already exists then it returns correctly. For now, it should be easy to workaround by just re-triggering the parent function if undefined is returned, because then the database folder/file should exist and give back the soul.
Unclear what you mean by "database" - I think we assumed it was a problem with radata being missing, but concluded the same problem occurred with the put.get i.e. the get didn't wait for the put to succeed, which would make it a potnetially bigger problem for Gun.
If the data was there, did the "once" work ? I don't remember ?
- Mitra
On 20/10/19 5:02 AM, Mark Nadal wrote:
@mitra42 https://github.com/mitra42 just a summary of our debug session to remember to do after the Archive event:
Querying on |/arc| doesn't work, but |arc| does.
You found a race-condition in GUN that on an empty database this line https://github.com/internetarchive/dweb-transport/blob/master/gun/gun_https_hijackable.js#L34-L35 will return an undefined soul, but if database already exists then it returns correctly. For now, it should be easy to workaround by just re-triggering the parent function if |undefined| is returned, because then the database folder/file should exist and give back the soul.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/internetarchive/dweb-transport/issues/31?email_source=notifications&email_token=AARDRFJNTACGAPSKCEU4RUTQPNDTTA5CNFSM4JCQ2G72YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HS6FSCA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARDRFIWEFYXRZAJRHTQZCDQPNDTTANCNFSM4JCQ2G7Q.
-- Mitra Ardron - [email protected] [email protected] Internet Archive - decentralization - offline access +1-510-423-1767 whatsapp, voice, sms Autralia: +61-491-082-515 voice, sms
@mitra42 yes I was referencing the radata folder.
If it is there, yes .once( works, and we confirmed GUN could be re-activated.
I'm working on some other issues now, will come back to that bug later. Since we have a simple workaround can we add this and get GUN re-activated (you said to ping you after the IA festival) would now be good? Thanks!
Understood - I've checked and that does appear to do it - I'll deploy tomorrow as heading home now.
- Mitra
On 31/10/19 2:18 PM, Mark Nadal wrote:
@mitra42 https://github.com/mitra42 yes I was referencing the |radata| folder.
If it is there, yes |.once(| works, and we confirmed GUN could be re-activated.
I'm working on some other issues now, will come back to that bug later. Since we have a simple workaround can we add this and get GUN re-activated (you said to ping you after the IA festival) would now be good? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/internetarchive/dweb-transport/issues/31?email_source=notifications&email_token=AARDRFKXFCRGS3CO4AG3PRLQRNDRVA5CNFSM4JCQ2G72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECZI44A#issuecomment-548572784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARDRFIDSSAT6IRC5ONYGU3QRNDRVANCNFSM4JCQ2G7Q.
-- Mitra Ardron - [email protected] [email protected] Internet Archive - decentralization - offline access +1-510-423-1767 whatsapp, voice, sms Autralia: +61-491-082-515 voice, sms
🎉