libreoffice-online/common
Ashod Nakashian d6259d6a54 wsd: support parallel systemplate setup
When tests are run in parallel, they will all
compete to update and set up the systemplate
directory, which has a handful of files that
need to be up-to-date. This is a source of errors.

Normally, these files are linked (hard- or soft-
link, whichever succeeds). With linking, we
only need to worry about the initial setup,
as the files will never be out-of-date from
then on. However, when linking fails, we need
to copy the files, and update them (by copying
over fresh versions of the files, if necessary)
every time a new kit is forked. Copying over
is tricky, as it's not atomic. To make it
atomic, we copy the files to the destination
directory under a temporary (random) name,
and then rename to the final name (which is
atomic, including replacing the target file,
if it exists).

No such race exists in production, where there
is (or should be) but one instance of loolwsd
(which does the initial setup) and forkit
(which updates systemplate before forking
new kit instances).
This is an issue with parallel tests only.

Change-Id: I6ba1514d00a84da7397d28efeb6378619711d52f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97785
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-07 19:05:23 +02:00
..
Authorization.cpp wsd: Authorization parsing and creation improvements 2020-07-01 07:33:57 +02:00
Authorization.hpp android: Remove unneeded dependency + add some comments. 2020-07-02 11:08:19 +02:00
Clipboard.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Common.hpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
Crypto.cpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Crypto.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
FileUtil.cpp wsd: support parallel systemplate setup 2020-07-07 19:05:23 +02:00
FileUtil.hpp wsd: support parallel systemplate setup 2020-07-07 19:05:23 +02:00
JailUtil.cpp wsd: support parallel systemplate setup 2020-07-07 19:05:23 +02:00
JailUtil.hpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
JsonUtil.hpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Log.cpp Drop the fixed prefix ("Mobile-") from log output in the iOS app 2020-07-02 22:16:53 +03:00
Log.hpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
LOOLWebSocket.hpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Message.hpp wsd: use more efficient StringVector::equals 2020-06-23 06:42:25 +02:00
MessageQueue.cpp wsd: match LOK callback type as integer 2020-07-02 21:49:31 +02:00
MessageQueue.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
MobileApp.cpp tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app 2020-06-26 13:09:51 +02:00
MobileApp.hpp tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app 2020-06-26 13:09:51 +02:00
Png.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Protocol.cpp wsd: move string-to-integer helper to Util 2020-07-02 02:38:35 +02:00
Protocol.hpp wsd: move string-to-integer helper to Util 2020-07-02 02:38:35 +02:00
Rectangle.hpp wsd: performance improvements 2020-06-02 20:01:39 +02:00
Seccomp.cpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Seccomp.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
security.h wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
Session.cpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
Session.hpp killpoco: removed Poco::Process completely 2020-04-29 14:27:54 +02:00
SigUtil.cpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
SigUtil.hpp tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app 2020-06-26 13:09:51 +02:00
SpookyV2.cpp
SpookyV2.h Use #pragma once 2020-04-18 15:00:18 +02:00
StringVector.cpp wsd: optimized tokenization 2020-06-02 17:25:19 +02:00
StringVector.hpp wsd: use more efficient StringVector::equals 2020-06-23 06:42:25 +02:00
Unit.cpp wsd: add http-headers unit-test 2020-07-01 07:37:10 +02:00
Unit.hpp wsd: add http-headers unit-test 2020-07-01 07:37:10 +02:00
UnitHTTP.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Util.cpp Slight refactoring to make planned re-plumbing of iOS app easier 2020-07-03 08:41:02 +02:00
Util.hpp Why call it a "hash"? 2020-07-03 09:46:40 +03:00