]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Try to be consistent in cached flag for maps
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 17 Jun 2025 07:41:59 +0000 (08:41 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 17 Jun 2025 07:41:59 +0000 (08:41 +0100)
src/libserver/maps/map.c

index b5778c4d04a9f5faa2f7c1cf5c8e20da7e91d306..ac82d39bb231e5884f16f7b1f71c2bc63776cc54 100644 (file)
@@ -620,7 +620,7 @@ http_map_finish(struct rspamd_http_connection *conn,
                /* Announce for other processes */
                g_atomic_int_set(&data->cache->available, 1);
                g_atomic_int_set(&map->shared->loaded, 1);
-               g_atomic_int_set(&map->shared->cached, 0);
+               g_atomic_int_set(&map->shared->cached, 1);
 
                rspamd_map_process_periodic(cbd->periodic);
        }
@@ -1550,9 +1550,6 @@ rspamd_map_read_cached(struct rspamd_map *map, struct rspamd_map_backend *bk,
                map->read_callback(in, len, &periodic->cbdata, TRUE);
        }
 
-       g_atomic_int_set(&map->shared->loaded, 1);
-       g_atomic_int_set(&map->shared->cached, 1);
-
        munmap(in, mmap_len);
 
        return TRUE;