From 75db6b13216546b04c90cc59c95095547d1c3b86 Mon Sep 17 00:00:00 2001 From: Christophe Larchier Date: Mon, 16 Dec 2024 10:35:23 +0100 Subject: [PATCH 1/5] Snapshot::path cache implementation --- .../remotefilesystemobserverworker.cpp | 8 +++--- .../remotefilesystemobserverworker.h | 2 +- .../snapshot/snapshot.cpp | 28 +++++++++++++++---- .../file_system_observer/snapshot/snapshot.h | 5 +++- .../snapshot/snapshotitem.h | 9 ++++++ .../jobs/network/testsnapshotitemhandler.h | 1 - .../testoperationsorterworker.cpp | 3 +- .../testconflictfinderworker.cpp | 2 +- .../testconflictresolverworker.cpp | 1 + .../testcomputefsoperationworker.cpp | 1 + .../file_system_observer/testsnapshot.cpp | 2 +- 11 files changed, 46 insertions(+), 16 deletions(-) diff --git a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp index 519219000..6d4b175ec 100644 --- a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp @@ -18,10 +18,10 @@ #include "remotefilesystemobserverworker.h" #include "jobs/jobmanager.h" -#include "../../jobs/network/API_v2/csvfullfilelistwithcursorjob.h" -#include "../../jobs/network/API_v2/getfileinfojob.h" -#include "../../jobs/network/API_v2/longpolljob.h" -#include "../../jobs/network/API_v2/continuefilelistwithcursorjob.h" +#include "jobs/network/API_v2/csvfullfilelistwithcursorjob.h" +#include "jobs/network/API_v2/getfileinfojob.h" +#include "jobs/network/API_v2/longpolljob.h" +#include "jobs/network/API_v2/continuefilelistwithcursorjob.h" #ifdef _WIN32 #include "reconciliation/platform_inconsistency_checker/platforminconsistencycheckerutility.h" #endif diff --git a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h index 4a19ad6f6..a958e10d6 100644 --- a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h +++ b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h @@ -19,8 +19,8 @@ #pragma once #include "filesystemobserverworker.h" - #include "jobs/network/networkjobsparams.h" +#include "snapshot/snapshotitem.h" #include diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp index 70dfa58d5..6fe03ff3a 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp @@ -17,6 +17,7 @@ */ #include "snapshot.h" +#include "snapshotitem.h" #include "libcommonserver/log/log.h" #include "requests/parameterscache.h" @@ -47,6 +48,7 @@ Snapshot &Snapshot::operator=(Snapshot &other) { _items = other._items; _isValid = other._isValid; + _copy = true; } return *this; @@ -237,7 +239,7 @@ bool Snapshot::path(const NodeId &itemId, SyncPath &path, bool &ignore) const no } bool ok = true; - std::deque names; + std::deque> ancestors; bool parentIsRoot = false; NodeId id = itemId; @@ -245,7 +247,14 @@ bool Snapshot::path(const NodeId &itemId, SyncPath &path, bool &ignore) const no const std::scoped_lock lock(_mutex); while (!parentIsRoot) { if (const auto it = _items.find(id); it != _items.end()) { - names.push_back(it->second.name()); + if (_copy) { + if (!it->second.path().empty()) { + path = it->second.path(); + break; + }; + } + + ancestors.push_back({it->first, it->second.name()}); id = it->second.parentId(); parentIsRoot = id == _rootFolderId; continue; @@ -257,16 +266,23 @@ bool Snapshot::path(const NodeId &itemId, SyncPath &path, bool &ignore) const no } // Construct path - SyncPath tmpParentPath; - while (!names.empty()) { - path /= names.back(); - names.pop_back(); + SyncPath tmpParentPath(path); + while (!ancestors.empty()) { + path /= ancestors.back().second; + if (_copy) { + _items.find(ancestors.back().first)->second.setPath(path); + } + ancestors.pop_back(); + + // Trick to ignore items with pattern like "X:" in their name on Windows - Begin if (path.parent_path() != tmpParentPath) { ignore = true; return false; } tmpParentPath = path; + // Trick to ignore items with pattern like "X:" in their name on Windows - End } + return ok; } diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h index 37c522299..ae300f2fa 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h @@ -19,7 +19,6 @@ #pragma once #include "syncpal/sharedobject.h" -#include "snapshotitem.h" #include "db/dbnode.h" #include @@ -29,6 +28,8 @@ namespace KDC { +class SnapshotItem; + class Snapshot : public SharedObject { public: Snapshot(ReplicaSide side, const DbNode &dbNode); @@ -93,6 +94,8 @@ class Snapshot : public SharedObject { NodeId _rootFolderId; std::unordered_map _items; // key: id bool _isValid = false; + bool _copy = false; // false for a real time snapshot, true for a copy + mutable std::recursive_mutex _mutex; }; diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h index ff7e5e605..4ca137656 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h @@ -20,6 +20,7 @@ #include "libcommon/utility/types.h" #include "libcommonserver/utility/utility.h" +#include "snapshot.h" #include #include @@ -58,6 +59,7 @@ class SnapshotItem { void setCanWrite(const bool canWrite) { _canWrite = canWrite; } [[nodiscard]] bool canShare() const { return _canShare; } void setCanShare(bool canShare) { _canShare = canShare; } + SnapshotItem &operator=(const SnapshotItem &other); void copyExceptChildren(const SnapshotItem &other); @@ -79,6 +81,13 @@ class SnapshotItem { bool _canShare = true; std::unordered_set _childrenIds; + + mutable SyncPath _path; // The item relative path. Cached value. To use only on a snapshot copy, not a real time one. + + [[nodiscard]] SyncPath path() const { return _path; } + void setPath(const SyncPath &path) const { _path = path; } + + friend bool Snapshot::path(const NodeId &, SyncPath &, bool &) const noexcept; }; } // namespace KDC diff --git a/test/libsyncengine/jobs/network/testsnapshotitemhandler.h b/test/libsyncengine/jobs/network/testsnapshotitemhandler.h index a66cbee97..dc2247c7e 100644 --- a/test/libsyncengine/jobs/network/testsnapshotitemhandler.h +++ b/test/libsyncengine/jobs/network/testsnapshotitemhandler.h @@ -24,7 +24,6 @@ using namespace CppUnit; namespace KDC { -class SnapshotItem; class TestSnapshotItemHandler : public CppUnit::TestFixture { public: diff --git a/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp b/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp index c277ff5c3..450008428 100644 --- a/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp +++ b/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp @@ -17,10 +17,11 @@ */ #include "testoperationsorterworker.h" - #include "test_utility/testhelpers.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include + using namespace CppUnit; namespace KDC { diff --git a/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp b/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp index c4d6e872e..0fef5e35a 100644 --- a/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp +++ b/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp @@ -17,8 +17,8 @@ */ #include "testconflictfinderworker.h" - #include "test_utility/testhelpers.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" using namespace CppUnit; diff --git a/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp b/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp index 14c6a348e..361afbe7d 100644 --- a/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp +++ b/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp @@ -19,6 +19,7 @@ #include "testconflictresolverworker.h" #include "requests/parameterscache.h" #include "reconciliation/platform_inconsistency_checker/platforminconsistencycheckerutility.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include "test_utility/testhelpers.h" #include diff --git a/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp b/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp index ee9ebf1e7..2bab99152 100644 --- a/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp +++ b/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp @@ -19,6 +19,7 @@ #include "testcomputefsoperationworker.h" #include "libcommon/keychainmanager/keychainmanager.h" #include "libcommon/utility/utility.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include "requests/exclusiontemplatecache.h" #include "requests/syncnodecache.h" #include "requests/parameterscache.h" diff --git a/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp b/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp index 9b1517f22..c9a64d730 100644 --- a/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp +++ b/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp @@ -18,9 +18,9 @@ #include "testsnapshot.h" #include "test_utility/testhelpers.h" - #include "db/syncdb.h" #include "requests/parameterscache.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" using namespace CppUnit; From 62f0256f0b0175c773f115f5be6371d06941e846 Mon Sep 17 00:00:00 2001 From: Christophe Larchier Date: Wed, 18 Dec 2024 11:17:23 +0100 Subject: [PATCH 2/5] Fix build --- .../file_system_observer/localfilesystemobserverworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp index da7ef6544..0fb1182de 100644 --- a/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp @@ -19,12 +19,12 @@ #include "localfilesystemobserverworker.h" #include "libcommon/utility/utility.h" #include "libcommon/log/sentry/ptraces.h" - #include "libcommonserver/io/filestat.h" #include "libcommonserver/io/iohelper.h" #include "libcommonserver/utility/utility.h" #include "requests/parameterscache.h" #include "requests/exclusiontemplatecache.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include From 7df44044a0ef5a3218fedc0d5aa46658ad602a13 Mon Sep 17 00:00:00 2001 From: Christophe Larchier Date: Thu, 19 Dec 2024 08:08:26 +0100 Subject: [PATCH 3/5] Fix issues --- .../file_system_observer/snapshot/snapshot.cpp | 4 +++- .../file_system_observer/snapshot/snapshotitem.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp index 6fe03ff3a..28427d4f9 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp @@ -270,7 +270,9 @@ bool Snapshot::path(const NodeId &itemId, SyncPath &path, bool &ignore) const no while (!ancestors.empty()) { path /= ancestors.back().second; if (_copy) { - _items.find(ancestors.back().first)->second.setPath(path); + const auto it = _items.find(ancestors.back().first); + assert(it != _items.end()); + it->second.setPath(path); } ancestors.pop_back(); diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.cpp b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.cpp index dd0fc040b..185287ae3 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.cpp @@ -54,6 +54,7 @@ void SnapshotItem::copyExceptChildren(const SnapshotItem &other) { _contentChecksum = other.contentChecksum(); _canWrite = other.canWrite(); _canShare = other.canShare(); + _path = other.path(); } void SnapshotItem::addChildren(const NodeId &id) { From f9c6faac426fc67ae346c32b41ea03c8588b1abe Mon Sep 17 00:00:00 2001 From: Christophe Larchier Date: Fri, 20 Dec 2024 11:48:45 +0100 Subject: [PATCH 4/5] Fix Linux build --- .../network/API_v2/csvfullfilelistwithcursorjob.cpp | 3 +-- .../network/API_v2/csvfullfilelistwithcursorjob.h | 2 +- .../network/API_v2/jsonfullfilelistwithcursorjob.h | 1 - .../localfilesystemobserverworker.cpp | 1 - .../remotefilesystemobserverworker.cpp | 1 + .../remotefilesystemobserverworker.h | 2 +- .../file_system_observer/snapshot/snapshot.h | 3 +-- .../file_system_observer/snapshot/snapshotitem.h | 6 ++++-- test/libsyncengine/jobs/network/testnetworkjobs.cpp | 13 +++++++------ .../jobs/network/testsnapshotitemhandler.cpp | 1 - .../operation_sorter/testoperationsorterworker.cpp | 1 - .../conflict_finder/testconflictfinderworker.cpp | 1 - .../testconflictresolverworker.cpp | 1 - .../testcomputefsoperationworker.cpp | 1 - .../file_system_observer/testsnapshot.cpp | 1 - 15 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.cpp b/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.cpp index f54bbe127..2233e6d6d 100644 --- a/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.cpp +++ b/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.cpp @@ -18,7 +18,6 @@ #include "csvfullfilelistwithcursorjob.h" #include "libcommonserver/utility/utility.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #ifdef _WIN32 #include "reconciliation/platform_inconsistency_checker/platforminconsistencycheckerutility.h" @@ -32,7 +31,7 @@ static const std::string endOfFileDelimiter("#EOF"); namespace KDC { -SnapshotItemHandler::SnapshotItemHandler(log4cplus::Logger logger) : _logger(logger) {}; +SnapshotItemHandler::SnapshotItemHandler(log4cplus::Logger logger) : _logger(logger) {} void SnapshotItemHandler::logError(const std::wstring &methodName, const std::wstring &stdErrorType, const std::string &str, const std::exception &exc) { diff --git a/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.h b/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.h index 2d42ed7d9..5cf49503f 100644 --- a/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.h +++ b/src/libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.h @@ -39,7 +39,7 @@ class SnapshotItemHandler { CsvIndexEnd }; - inline static void incrementCsvIndex(CsvIndex &index) { index = static_cast(static_cast(index) + 1); }; + inline static void incrementCsvIndex(CsvIndex &index) { index = static_cast(static_cast(index) + 1); } struct ParsingState { CsvIndex index{CsvIndexId}; // The index of the column that is currently read. diff --git a/src/libsyncengine/jobs/network/API_v2/jsonfullfilelistwithcursorjob.h b/src/libsyncengine/jobs/network/API_v2/jsonfullfilelistwithcursorjob.h index b538a573b..56abe26c9 100644 --- a/src/libsyncengine/jobs/network/API_v2/jsonfullfilelistwithcursorjob.h +++ b/src/libsyncengine/jobs/network/API_v2/jsonfullfilelistwithcursorjob.h @@ -19,7 +19,6 @@ #pragma once #include "abstracttokennetworkjob.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" namespace KDC { diff --git a/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp index 4a0ea3c91..9c3e50c67 100644 --- a/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/localfilesystemobserverworker.cpp @@ -24,7 +24,6 @@ #include "libcommonserver/utility/utility.h" #include "requests/parameterscache.h" #include "requests/exclusiontemplatecache.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include diff --git a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp index 6d4b175ec..69bd1ce1e 100644 --- a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.cpp @@ -32,6 +32,7 @@ #include "requests/parameterscache.h" #include "requests/exclusiontemplatecache.h" #include "utility/jsonparserutility.h" + #ifdef __APPLE__ #include "utility/utility.h" #endif diff --git a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h index a958e10d6..03db2ee49 100644 --- a/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h +++ b/src/libsyncengine/update_detection/file_system_observer/remotefilesystemobserverworker.h @@ -20,7 +20,7 @@ #include "filesystemobserverworker.h" #include "jobs/network/networkjobsparams.h" -#include "snapshot/snapshotitem.h" +#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h index ae300f2fa..3de99e87f 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h @@ -20,6 +20,7 @@ #include "syncpal/sharedobject.h" #include "db/dbnode.h" +#include "snapshotitem.h" #include #include @@ -28,8 +29,6 @@ namespace KDC { -class SnapshotItem; - class Snapshot : public SharedObject { public: Snapshot(ReplicaSide side, const DbNode &dbNode); diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h index 54b2a06ab..1aa25f4c0 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshotitem.h @@ -20,13 +20,14 @@ #include "libcommon/utility/types.h" #include "libcommonserver/utility/utility.h" -#include "snapshot.h" #include #include namespace KDC { +class Snapshot; + class SnapshotItem { public: SnapshotItem(); @@ -95,7 +96,8 @@ class SnapshotItem { [[nodiscard]] SyncPath path() const { return _path; } void setPath(const SyncPath &path) const { _path = path; } - friend bool Snapshot::path(const NodeId &, SyncPath &, bool &) const noexcept; + friend class Snapshot; + // friend bool Snapshot::path(const NodeId &, SyncPath &, bool &) const noexcept; }; } // namespace KDC diff --git a/test/libsyncengine/jobs/network/testnetworkjobs.cpp b/test/libsyncengine/jobs/network/testnetworkjobs.cpp index 9090f2d8b..e1234351c 100644 --- a/test/libsyncengine/jobs/network/testnetworkjobs.cpp +++ b/test/libsyncengine/jobs/network/testnetworkjobs.cpp @@ -40,20 +40,21 @@ #include "jobs/network/API_v2/getsizejob.h" #include "jobs/jobmanager.h" #include "network/proxy.h" +#include "utility/jsonparserutility.h" +#include "requests/parameterscache.h" +#include "jobs/network/getappversionjob.h" +#include "jobs/network/directdownloadjob.h" #include "libcommon/keychainmanager/keychainmanager.h" #include "libcommonserver/utility/utility.h" #include "libcommonserver/io/filestat.h" #include "libcommonserver/io/iohelper.h" #include "libparms/db/parmsdb.h" -#include "utility/jsonparserutility.h" -#include "requests/parameterscache.h" + #include "test_utility/localtemporarydirectory.h" #include "test_utility/remotetemporarydirectory.h" -#include - -#include "jobs/network/getappversionjob.h" #include "test_utility/testhelpers.h" -#include "jobs/network/directdownloadjob.h" + +#include using namespace CppUnit; diff --git a/test/libsyncengine/jobs/network/testsnapshotitemhandler.cpp b/test/libsyncengine/jobs/network/testsnapshotitemhandler.cpp index 5ecdad0bb..8d6c11d4e 100644 --- a/test/libsyncengine/jobs/network/testsnapshotitemhandler.cpp +++ b/test/libsyncengine/jobs/network/testsnapshotitemhandler.cpp @@ -18,7 +18,6 @@ #include "testsnapshotitemhandler.h" #include "libsyncengine/jobs/network/API_v2/csvfullfilelistwithcursorjob.h" - #include "libcommonserver/log/log.h" diff --git a/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp b/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp index 450008428..6e4224da4 100644 --- a/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp +++ b/test/libsyncengine/propagation/operation_sorter/testoperationsorterworker.cpp @@ -18,7 +18,6 @@ #include "testoperationsorterworker.h" #include "test_utility/testhelpers.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include diff --git a/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp b/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp index 0fef5e35a..ff9aa26af 100644 --- a/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp +++ b/test/libsyncengine/reconciliation/conflict_finder/testconflictfinderworker.cpp @@ -18,7 +18,6 @@ #include "testconflictfinderworker.h" #include "test_utility/testhelpers.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" using namespace CppUnit; diff --git a/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp b/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp index 361afbe7d..14c6a348e 100644 --- a/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp +++ b/test/libsyncengine/reconciliation/conflict_resolver/testconflictresolverworker.cpp @@ -19,7 +19,6 @@ #include "testconflictresolverworker.h" #include "requests/parameterscache.h" #include "reconciliation/platform_inconsistency_checker/platforminconsistencycheckerutility.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include "test_utility/testhelpers.h" #include diff --git a/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp b/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp index ed1f5c971..fc66f2f37 100644 --- a/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp +++ b/test/libsyncengine/update_detection/file_system_observer/testcomputefsoperationworker.cpp @@ -19,7 +19,6 @@ #include "testcomputefsoperationworker.h" #include "libcommon/keychainmanager/keychainmanager.h" #include "libcommon/utility/utility.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" #include "requests/exclusiontemplatecache.h" #include "requests/syncnodecache.h" #include "requests/parameterscache.h" diff --git a/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp b/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp index fdd7ab6fa..7f149ac62 100644 --- a/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp +++ b/test/libsyncengine/update_detection/file_system_observer/testsnapshot.cpp @@ -20,7 +20,6 @@ #include "test_utility/testhelpers.h" #include "db/syncdb.h" #include "requests/parameterscache.h" -#include "update_detection/file_system_observer/snapshot/snapshotitem.h" using namespace CppUnit; From f56b58c8e2da2fb18af78333531d9cc5227b2348 Mon Sep 17 00:00:00 2001 From: Christophe Larchier Date: Fri, 20 Dec 2024 11:56:09 +0100 Subject: [PATCH 5/5] Address comments --- .../update_detection/file_system_observer/snapshot/snapshot.cpp | 1 - .../update_detection/file_system_observer/snapshot/snapshot.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp index 401131c9e..23c6c2463 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.cpp @@ -17,7 +17,6 @@ */ #include "snapshot.h" -#include "snapshotitem.h" #include "libcommonserver/log/log.h" #include "requests/parameterscache.h" diff --git a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h index 3de99e87f..9b22ab756 100644 --- a/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h +++ b/src/libsyncengine/update_detection/file_system_observer/snapshot/snapshot.h @@ -19,8 +19,8 @@ #pragma once #include "syncpal/sharedobject.h" -#include "db/dbnode.h" #include "snapshotitem.h" +#include "db/dbnode.h" #include #include