Add a database lock when downloading remote file
Right now, due to partial request, we sometimes send 2 or 3 requests to the remote library, which is not good.
Right now, due to partial request, we sometimes send 2 or 3 requests to the remote library, which is not good.