Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/102149
Change subject: mw-install-sqlite: .sqlite deletion had a race condition
......................................................................
mw-install-sqlite: .sqlite deletion had a race condition
When running multiple jobs in parralel, they all ends up using a sqlite
file in something like /tmpfs/<jobname>. Deleting all sqlite files there
would thus cause a race condition between jobs where a new job might
delete the sqlite file of a currently running job.
Instead of rm, use find to delete sqlite files that are older than an
hour.
Change-Id: I95ef783cc42beb19c86de2b524f7e04a962c0105
---
M bin/mw-install-sqlite.sh
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins
refs/changes/49/102149/1
diff --git a/bin/mw-install-sqlite.sh b/bin/mw-install-sqlite.sh
index eb7a98e..d106698 100755
--- a/bin/mw-install-sqlite.sh
+++ b/bin/mw-install-sqlite.sh
@@ -14,8 +14,8 @@
# Ensure LocalSettings does not exist
rm -f LocalSettings.php
-# Purge sqlite databases
-rm -f "$SQLITE_DIR"/*.sqlite
+# Purge sqlite databases modified more than 60 minutes ago
+find "$SQLITE_DIR" -type f -name '*.sqlite' -mmin +60 -delete
# $wgDBName
DB_NAME="build${BUILD_NUMBER}"
--
To view, visit https://gerrit.wikimedia.org/r/102149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I95ef783cc42beb19c86de2b524f7e04a962c0105
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits