From 2a64b5c880127b5fa6eff4961fef61319f83d0f1 Mon Sep 17 00:00:00 2001 From: Felix Schurk <75752337+felixschurk@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:49:14 +0200 Subject: [PATCH] change implementation from has (#3849) Change from get(uuid, task) to get_task_data to always have a full uuid match and to improve read performance for the diagnostics command. See #3848 for details. --- src/TDB2.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index c49f513d6..5676a509f 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -354,8 +354,7 @@ bool TDB2::get(const std::string& uuid, Task& task) { //////////////////////////////////////////////////////////////////////////////// // Locate task by UUID, wherever it is. bool TDB2::has(const std::string& uuid) { - Task task; - return get(uuid, task); + return replica()->get_task_data(tc::uuid_from_string(uuid)).is_some(); } ////////////////////////////////////////////////////////////////////////////////