Merge pull request #12121 from kobergj/DontIndexFailedUploads

Dont Index failed uploads
This commit is contained in:
kobergj authored and GitHub committed 2026-03-20 14:58:16 +01:00
commit ac7f054633
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)