Re: [IndexedDB] Consider adding a completion event or callback to the IDBDatabase.close() operation (#72)

> I wasn't aware that transactions could be open indefinitely?

As long as you keeping making requests the transaction won't try and commit. The implementation would know that no further transactions can be started, but no idea when any outstanding ones would complete.

>  when a blocked event is encountered, cancel the open transaction, wait a few milliseconds and then retry again.. repeat that several times if needed (say up a second or two in total) and eventually give up with an error if that doesn't help.

FWIW, you can't directly cancel an open request; the closest you can get is to abort the transaction in the `"upgradeneeded"` handler and/or close the connection immediately in the `"success"` handler.

I'm not sure why you'd retry though; if you want this behavior, just set a timer when you see "blocked" and if the request hasn't progressed to "upgradeneeded" or "succeeded" when the timer has fired you can provide your error (and abort/close if/when it does come through).

No disagreement that a close event would be handy in some cases (which is why this issue is still open!)


---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/72#issuecomment-199547357

Received on Tuesday, 22 March 2016 00:02:50 UTC