w3c / IndexedDB

Indexed Database API
https://w3c.github.io/IndexedDB/
Other
240 stars 62 forks source link

Transaction lifetime verbiage, "running" #408

Closed evanstade closed 1 year ago

evanstade commented 1 year ago

The spec refers to times when a transaction is running or a running transaction in several places e.g. [1][2][3][4][5]. It's not clear to me what it means to be in a running state or if it's possible to have a transaction that is not running. Nothing in the "transaction lifecycle" portion mentions when a transaction is "running". I'm not sure if we need a definition of running or if we need to replace the term with other ones that already carry definitions.

"Running" is also used in the name of an algorithm, namely "Running an upgrade transaction". But some of the times the doc uses "running" refer to non-upgrade transactions, so I don't think the definition is "while the steps to run an upgrade transaction are being executed" is the correct definition.

Does "running" simply mean that the transaction exists and is associated with a database? Does it mean any state in the transaction lifecycle prior to "finished"? In some cases, such as "limits on the number of running transactions", I think it might mean after "started" (which is not itself a state) but before the state is set to finished.

I would also suggest changing "Running an upgrade transaction" so we don't get phrases like "run the steps to run a transaction". Maybe it could be "Upgrading a database"?