Branch: Tag:

2011-11-30

2011-11-30 11:10:50 by Marcus Wellhardh <wellhard@roxen.com>

Changed ImageCache.sync_meta() to make sure only one thread syncs the cached atimes.

Rev: server/base_server/roxen.pike:1.1083

6:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.1082 2011/11/30 11:09:22 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1083 2011/11/30 11:10:50 wellhard Exp $";      //! @appears roxen   //!
3869:       protected void sync_meta()    { +  mapping tmp = meta_cache; +  meta_cache = ([]);    // Sync cached atimes. -  foreach(meta_cache; string id; array value) { +  foreach(tmp; string id; array value) {    if (value[1])    QUERY("UPDATE "+name+" SET atime=%d WHERE id=%s",    value[1], id);    } -  meta_cache = ([]); +     }       void flush(int|void age)