Re: rawhide report: 20081006 changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 08 Oct 2008 12:44:35 -0400, James Antill wrote:

[race in mash+createrepo]

> This should fix it:
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=868762
> 
> ...the patch being basically:
> 
> -            csumo = open(csumfile, 'w')
> +
> +            #  This is atomic cache creation via. rename, so we can have two
> +            # tasks using the same cachedir ... mash does this.
> +            csumo = tempfile.NamedTemporaryFile(mode='w', dir=self.crp_cachedir
>              csumo.write(checksum)
>              csumo.close()
> +            os.rename(csumo.name, csumfile)
> 
> 
> ...it'll get upstream as soon as I can push :).

Looks good. It's the most you can do in createrepo without adding locks.
A small penalty remains, because the same checksum may be generated more
than once in a race-condition. Neglectable IMO.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux