Commit Graph

79 Commits

Author SHA1 Message Date
Klaus Basan
6284ed0c5a Minor style adjustments 2020-01-18 02:48:28 +01:00
Mat Sutcliffe
4a0d8e9864 Fixed most Qt 5.14 deprecation warnings 2020-01-07 19:57:25 +00:00
Mat Sutcliffe
69afe771d2 Ref T321 Improve CAtomicFile error message and advise the user to try restarting or manually deleting. 2019-02-23 19:01:10 +00:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Mat Sutcliffe
6c05c5249d When calling arg() on a QString constructed from a literal, use QStringLiteral. 2019-02-22 20:23:47 +00:00
Mat Sutcliffe
c71d358648 Fixed clazy warnings: unnecessary containers and containers being detached. 2019-02-22 20:23:37 +00:00
Mat Sutcliffe
462172a87f Fixed clazy warnings: unnecessary containers and containers being detached in range-for loops. 2019-02-22 20:23:37 +00:00
Klaus Basan
4f3cb6447f Ref T292, Ref T285 minor adjustments in worker/cache 2018-07-26 21:40:52 +02:00
Klaus Basan
fa6f83d87b Ref T218, sequence replaceOrAdd overloads 2018-01-14 18:45:50 +01:00
Klaus Basan
26b5a6ce28 Found during T215, rectify CIdentifier issues
* null/anonymous identifier
* CIdentifier can be linked with QObject and
* CIdentifier reflects name changes of QObject (UI components change name after ctor call)
2018-01-13 05:04:27 +01:00
Klaus Basan
8324c2d305 Ref T160, continous worker now CIdentifiable and name is mandatory 2017-09-25 05:23:57 +02:00
Mathew Sutcliffe
de11f7fe35 Correctly remove session cache value of expired session.
Summary:
`CDataCacheRevision` stores current working timestamps in `m_timestamps` and stores complete timestamps (including unadmitted deferred values) in `m_originalTimestamps`. A value is "in" the cache if and only if its timestamp is in `m_timestamps`. In `writeNewRevision` the `.rev` file is written based on `m_originalTimestamps` so that unadmitted deferred values don't get lost.

Session cache works by removing timestamps that were not created in the current session. But it needs to remove from both `m_timestamps` and `m_originalTimestamps` so that old session cache values can't get recreated by `writeNewRevision`.

Test Plan: Currently being evaluated by @kbasan to check that it does not introduce unintended consequences.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: #swift_pilot_client, kbasan

Subscribers: jenkins, kbasan

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D53
2017-09-24 19:53:41 +01:00
Mathew Sutcliffe
b7f69c6887 refs #937 Resolved clazy warnings: unnecessary memory allocation. 2017-04-19 19:31:39 +01:00
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00
Klaus Basan
ecb7877908 refs #906, obtain .rev file name from static function instead of member 2017-04-18 00:00:34 +01:00
Mathew Sutcliffe
0d0e2cf9e0 refs #884 Refactoring: moved method. 2017-04-18 00:00:20 +01:00
Mathew Sutcliffe
70224bea72 refs #904 Settings JSON files split into arbitrary levels of subfolders, one file per key. 2017-04-17 23:59:00 +01:00
Klaus Basan
9b4b2f70cc refs #890, use CFileUtils to append paths 2017-04-17 23:56:58 +01:00
Klaus Basan
888375d294 refs #887, directories available via CDirectoryUtils/relative paths
* relative cache/settings paths are available relativeFilePath
* directories build in CDirectoryUtils
* directory comparison in CDirectoryUtils
* using CFileUtils to concatenate dir paths
* using URL encoded string for normalized directory (as it can be decoded)
2017-03-01 20:51:34 +01:00
Mathew Sutcliffe
97e3cf8475 refs #890 Use BlackMisc::singleShot for async calls in CDataCache,
to tolerate calls made before the CDataCacheSerializer has started.
(Like all CContinuousWorkers, it moves thread upon being started.)
2017-02-26 03:36:12 +00:00
Mathew Sutcliffe
3439edf946 Fixed warning and error found by Clang svn-trunk. 2017-02-25 02:11:16 +00:00
Mathew Sutcliffe
c268581954 refs #885 Regenerate revision file from available JSON files. 2017-02-25 02:11:13 +00:00
Mathew Sutcliffe
51c3ae8c25 refs #815 Catch and handle CJsonException when calling convertFromJson. 2017-01-10 23:46:36 +00:00
Klaus Basan
3f2fc33b27 Minor change, added ' in error messages 2017-01-10 23:46:08 +00:00
Roland Winklmeier
e82d06849c Upgrade and cleanup cppcheck suppressions to version 1.76.1
Also renamed the suppressions file to the standard name.

refs #831
2017-01-10 23:44:25 +00:00
Mathew Sutcliffe
5d7289adb3 refs #784 The data cache worker thread could interfere with performance measurements,
so only run it in applications that start the main event loop.
2016-12-13 19:00:19 +01:00
Mathew Sutcliffe
1e3afea9c2 refs #783 Used BlackMisc::singleShot in CDataPageQueue::queueValuesFromCache, to tolerate the page owner moving thread. 2016-12-06 09:34:08 +01:00
Mathew Sutcliffe
0b07088639 refs #782 Extended error information when data cache fails to write. 2016-12-06 09:34:05 +01:00
Mathew Sutcliffe
d0d1a9c8b8 refs #756 Fixed session cache concept:
Each new session generates an ID identifying that session, and
the .rev file annotates the ID associated with each cache value.
This is needed to avoid reading a value from a previous session
when loading for a continuing (non-new) session. The coarse-
grained approach of distinguishing new sessions from non-new
sessions was insufficient.
2016-12-06 09:33:52 +01:00
Mathew Sutcliffe
937cdbcc55 refs #756 Minor simplification and removal of unnecessary code. 2016-12-06 09:33:51 +01:00
Mathew Sutcliffe
64315e1022 refs #756 Allow to mark data cache traits with a session flag, so they are overwritten when starting a new session.
(Starting a new session means, that a swift application is started when no other swift application is running.)
2016-10-17 14:34:24 +01:00
Mathew Sutcliffe
3c82bb3a9c Data cache shall emit an error message if it fails to save the revision file. 2016-08-26 21:04:40 +01:00
Mathew Sutcliffe
e7c9d3b62f CDataCacheRevision: always need to lock the mutex when accessing m_updateInProgress. 2016-08-02 17:14:14 +01:00
Mathew Sutcliffe
88920501bf refs #715 Assert no longer appropriate: pruning revision file means calling writeNewRevision when m_pendingWrite is false. 2016-08-02 05:09:39 +01:00
Mathew Sutcliffe
61f3655b2c refs #695 Allow to set a mock root directory for caches, for unit tests. 2016-07-29 17:09:08 +01:00
Mathew Sutcliffe
9339991644 refs #715 When loading data cache, prune revision file to remove keys that weren't found. 2016-07-29 17:09:07 +01:00
Mathew Sutcliffe
242e041ceb refs #679 CValueCache local signal relay moved to the point of emission, to tolerate different orders of initialization of application. 2016-06-30 02:06:16 +01:00
Klaus Basan
dc02ff2d0c Addded log categories / human readable pattern 2016-06-29 01:04:44 +02:00
Mathew Sutcliffe
61127f9088 refs #672 Fixed getTimestampOnDisk returning wrong timestamp when called while loading is in progress. 2016-06-15 00:30:56 +01:00
Mathew Sutcliffe
183c4d9528 refs #659 Improved fix for spurious zeroing out of timestamps. 2016-06-08 21:39:18 +01:00
Roland Winklmeier
4180a890e4 Write settings, logs, cache, etc. into a installation dependent subfolder
refs #668
2016-06-08 21:30:56 +02:00
Mathew Sutcliffe
e67c07f8c5 refs #659, #657 Fixed a mistake where admitting an uncached value could cause synchronize() to wait forever. 2016-06-06 18:27:52 +01:00
Mathew Sutcliffe
d53237cebc refs #659, #657 Fixed mistake in synchronize() where a future would be broken prematurely if async load had not yet started after 1 second timeout. 2016-06-06 18:27:51 +01:00
Mathew Sutcliffe
50de252ff6 refs #659 Fixed a bug where valid timestamps of unloaded values would be lost when writing a new .rev file. 2016-06-04 00:51:01 +01:00
Mathew Sutcliffe
0bb17414ac refs #659 Cache value with timestamp of 0 should still be loadable. 2016-06-04 00:51:00 +01:00
Mathew Sutcliffe
8377ab2e51 refs #659 Method to get timestamp from revision file without loading value. 2016-06-04 00:50:59 +01:00
Mathew Sutcliffe
5559d1fcc6 refs #659 Use a threadsafe queue for admit(), to avoid a race with synchronize(). 2016-06-04 00:50:54 +01:00
Mathew Sutcliffe
f1a9ae5a13 refs #659 Add the method CData::admit() which causes a value with deferred loading to be loaded. 2016-06-04 00:50:47 +01:00
Mathew Sutcliffe
29cea55bc9 refs #659 Allow setting a "deferred" flag in data cache values, causing the value not to be loaded. 2016-05-26 20:03:13 +01:00