natsukagami / kjudge

A simple system for hosting competitive programming contests.
GNU Affero General Public License v3.0
23 stars 11 forks source link

go-sqlite3 and concurrent writes #28

Closed natsukagami closed 4 years ago

natsukagami commented 4 years ago

What version are you encountering the bug in? v0.6.0 but basically all versions

Describe the bug go-sqlite doesn't play well with concurrent writes in the default configuration. This shows up as database is locked errors.

Relevant context https://github.com/mattn/go-sqlite3/issues/274

To Reproduce Perform mass rejudge and some write requests at the same time.

Logs kjudge.db.zip by @TrungNguyen1909

Additional context

3 steps to mitigate this (from above context):