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.
This commit is contained in:
Felix Schurk 2025-04-16 15:49:14 +02:00 committed by GitHub
parent 15bb71764e
commit 2a64b5c880
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
}
////////////////////////////////////////////////////////////////////////////////