Conversation
| kj::WriteMode::CREATE | kj::WriteMode::MODIFY | kj::WriteMode::CREATE_PARENT); | ||
|
|
||
| // Before we do anything, make sure the database is in WAL mode. | ||
| db->run("PRAGMA journal_mode=WAL;"); |
There was a problem hiding this comment.
Is there a test to ensure that the db is in WAL mode?
There was a problem hiding this comment.
I guess not at present.
Technically workerd works fine in any mode, we only enable WAL because it's better.
Storage Relay Service (what we use on the edge) absolutely requires WAL mode, so all its tests would certainly blow up with out it. But it also doesn't depend on workerd setting it; it sets WAL mode itself in internal code.
|
Hmm, the Did we miss a bypass or initialization somewhere? |
e4720b4 to
5294df8
Compare
No, the test was checking for precise error text that depended on the |
In the edge runtime, WAL mode is already set elsewhere, so this statement was redundant there. And anyway, maybe someday we'll have a mode where there's no KV table.
This way, if a Durable Object never actually uses the KV storage interface -- only uses SQL -- we'll never create the table and can skip preparing statements for it. This will also make it easier for the edge runtime to clean up actors that never had data.
5294df8 to
32bdb4b
Compare
This way, if a Durable Object never actually uses the KV storage interface -- only uses SQL -- we'll never create the table and can skip preparing statements for it.
This will also make it easier for the edge runtime to clean up actors that never had data.