As SQLite Doc mentioned,
WAL provides more concurrency as readers do not block writers and a writer does not block readers. Reading and writing can proceed concurrently.
Writers merely append new content to the end of the WAL file. Because writers do nothing that would interfere with the actions of readers, writers and readers can run at the same time. However, since there is only one WAL file, there can only be one writer at a time.
I've tried to simulate the scenario by sending multiple requests via JMeter as following:
https://i.stack.imgur.com/HdKBf.png
Nothing went wrong after the simulation. But my concerns are:
- Does it mean in WAL mode, SQLite will handle multiple write requests itself?
- Did I simulate the scenario in the right way? (Is there any better tool to do it?)
Thanks in advanced.