google / google/codeworld

/saveProject leads to "resource busy (file is locked)" in logs

Open
#963 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

I'm seeing occasional `/saveProject` requests in logs that fail with this exception:

A web handler threw an exception. Details:
data/haskell/projects/123456789123456789/SABC123ABC123ABC123.cw: openBinaryFile: resource busy (file is locked)

A hypothesis is that these can occur when a client sends two save commands at nearly the same time, in which case this could be fixed on the client by tracking when a save is in-progress, and refusing to start a new one until it either finishes or times out. (Timeout would be crucial, since we don't want to lock a student into a situation where they can't retry a save.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.