fix: dont index failed uploads

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
This commit is contained in:
Julian Koberg authored and kobergj committed 2026-03-18 14:04:08 +01:00
1 parent f62acb2f38
commit ba41ba62b0
2 files changed
+10

No files matched your search

@@ -0,0 +1,7 @@
Bugfix: Don't index failed uploads
The search service was indexing uploads even when they failed. This caused
unnecessary index operations for incomplete or errored file transfers. The fix
skips indexing when the UploadReady event indicates the upload has failed.
https://github.com/owncloud/ocis/pull/12121
+3
View File
@@ -87,6 +87,9 @@ func HandleEvents(s Searcher, bus events.Consumer, logger log.Logger, cfg *confi
case events.FileUploaded:
indexSpaceDebouncer.Debounce(getSpaceID(ev.Ref))
case events.UploadReady:
if ev.Failed {
return
}
indexSpaceDebouncer.Debounce(getSpaceID(ev.FileRef))
case events.SpaceRenamed:
indexSpaceDebouncer.Debounce(ev.ID)