From eb88878cb3fe30c3b0c9969f9fb201151ef62f48 Mon Sep 17 00:00:00 2001 From: Dmytro Bulatov Date: Mon, 23 Mar 2026 23:30:49 +0900 Subject: [PATCH] Fixed race condition in get_all_submissions caching --- source/db-server/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/db-server/main.js b/source/db-server/main.js index 507ba3c..3462137 100644 --- a/source/db-server/main.js +++ b/source/db-server/main.js @@ -89,6 +89,7 @@ async function populateGetAllSubmissionsCache() { result["deflate"] = await deflateCompression getAllSubmissionsCache = result + databaseLastModificationTime = GetCurrentTimeAsString() } await populateGetAllSubmissionsCache() @@ -119,11 +120,9 @@ function requestCacheUpdate() { } function markDatabaseModified(isDeleted = false) { - const currentTime = GetCurrentTimeAsString() if (isDeleted) { - databaseLastDeleteTime = currentTime + databaseLastDeleteTime = GetCurrentTimeAsString() } - databaseLastModificationTime = currentTime requestCacheUpdate() }