Conversation
|
There is some value in not repeatedly overwriting the common files on each grade request. If you do overwrite them, you risk having the vmms copying a partial file if another tango thread is writing at the same time the vmms is reading (or running scp). You could fix that by using a .NEW file and renaming if you really wanted to. The file list was removed from tango because it caused performance problems when assignment directories had alot of items in them. That's where the excessive computations server side occur. |
|
I see. In that case, I agree we should not haphazardly overwrite existing files. We should probably implement a solution for replacing files since it does occur even right now, admittedly very rarely. However, at the same time, this seems like something we could minimize by letting the client know what files we already have so they don't even need to send it. If the only problem with this is too much computation during |
Fixes #137 (involves reverting #113).
#113 changed the behavior of
openso that it always returns an empty md5 dict. This means the client will always send all their files each time. Interestingly, md5 checking is done during upload requests. Not only is this inefficient, it is not even needed: If the client already sent us their latest version of the file, there's no point in checking md5 at this point, just save it. The entire point of md5 was so that the client wouldn't need to send us everything.Changes proposed in this PR:
openrequest. This way the client can compare checksums and only send over new and updated files.file_existsis removed since it's not useful or even worth it to compare checksums during an upload request. The client should be able to make the choice of what files it want uploaded. And it makes no difference in the end if the client uploaded an existing file. (In fact, if by some odd chance, two files resulted in the same md5, this would be the only way it could get updated).