Skip to content

🚨(backend) fix is_active in SearchIndexer#693

Open
mascarpon3 wants to merge 1 commit into
mainfrom
fix-indexing
Open

🚨(backend) fix is_active in SearchIndexer#693
mascarpon3 wants to merge 1 commit into
mainfrom
fix-indexing

Conversation

@mascarpon3

Copy link
Copy Markdown

i explored this bug

"""
Problematic behavior
When adding new files or deleting files, search indexer API is called with lists of files.
Some files are missing in that lists. Some files appear twice in that lists.

Expected behavior/code
All files added or deleted should appear in the lists sent to the API, so all files added are indexed, and all files deleted are removed from the index.

Steps to Reproduce
0. Prerequisite : replace Search Indexer URL with an API that catchs all calls and logs the payloads

Create a folder in drive
Access this folder
Drag & drop 6 files in that folder
Bug appears : only 5 files are in the lists sent to the SEARCH INDEXER API
Delete 4 files in the folder
Bug appears : only 3 files are in the lists sent to the SEARCH INDEXER API
Environment

Drive version: dev (built from source)
Commit:
Deployment: Docker Compose (dev stack)
"""

i don't reproduce the bug. i never observe a missing file. but i observe several indexing calls are sent when uploading 6 files. each call contain a a sub-set of all files. some of them are indexed several times because an item objects is saved several times when uploading a file and indexing is triggered with a post save signal.

this is solving 2 related bugs

  • is_active is already True. it does not take deleted_at into account. -> fix logic
  • item.reach can be None but Find accepts no reach but not a reach of None. -> remove the reach if None.

@mascarpon3
mascarpon3 force-pushed the fix-indexing branch 2 times, most recently from b13710c to 443d638 Compare April 27, 2026 08:04
here are 2 fixes for
- is_active is already True. it does not take
deleted_at into account.
- item.reach can be None but Find accepts
no reach but not a reach of None.

Signed-off-by: charles <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant