fix: four review issues (search cap, tagging pause, stale tag, walkdir)
- commands: semantic search doubling loop now returns when batch reaches the 8192 cap rather than re-fetching the same IDs forever when filters yield fewer than limit matches (P1 infinite loop) - db/indexer: tagging worker checks is_tagging_job_processing instead of is_tagging_job_cancelled so paused jobs reset to 'pending' are also discarded; cancelled rows are deleted, paused rows kept for retry - Lightbox: capture image id at form-submit time and compare against currentImageIdRef in the addUserTag callback, matching the guard already applied to the getImageTags effect - indexer: WalkDir errors are no longer silently swallowed; paths under unreadable subtrees are excluded from the missing-file deletion pass using Path::starts_with (component-aware) so a transient permission error cannot cascade into data loss or affect sibling directories
This commit is contained in:
@@ -571,6 +571,11 @@ pub async fn semantic_search_images(
|
||||
images.truncate(limit);
|
||||
return Ok(images);
|
||||
}
|
||||
// If we are already at the fetch cap, another iteration would fetch the
|
||||
// exact same IDs — break out rather than looping forever.
|
||||
if batch >= 8192 {
|
||||
return Ok(images);
|
||||
}
|
||||
batch = (batch * 2).min(8192);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user