pculture/mirocommunity — comment on commit a1cf594f9ca2f5700119cfccaa9fdc37e08b9b80
File:  line 0
By melinath:

I'm a little confused on the race condition aspect of this. mark_import_complete is spawned at the end of the SourceImport.handle_* calls, so it is definitely running *after* the updates to the count fields in any given call. Since the updates to the count field are run using F objects, they add one to the field no matter what its current value is, and they do it in one query, so there can't really be a race condition between those updates. Unless I'm missing something.