From e0f2051ec8d5ceabc895e9136e09898dd3dc5377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Tue, 19 Mar 2024 10:40:11 -0300 Subject: [PATCH] docs: fixing race condition comment --- openedx/core/djangoapps/content/search/api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openedx/core/djangoapps/content/search/api.py b/openedx/core/djangoapps/content/search/api.py index 14b457612f43..273e1e3a4e5f 100644 --- a/openedx/core/djangoapps/content/search/api.py +++ b/openedx/core/djangoapps/content/search/api.py @@ -293,8 +293,7 @@ def upsert_xblock_index_doc( update_tags (bool): If True, update the tags of the XBlock """ # If there is a rebuild in progress, wait for it to finish - # This could still be a problem if a rebuild starts right after this check, but we don't want to prevent - # concurrent updates entirely. + # If a rebuild starts right after this check, it will already have the updated data, so this is not a problem. _wait_index_rebuild_lock(INDEX_NAME) course = modulestore().get_item(usage_key) @@ -319,8 +318,7 @@ def delete_xblock_index_doc(usage_key: UsageKey) -> None: Deletes the document for the given XBlock from the search index """ # If there is a rebuild in progress, wait for it to finish - # This could still be a problem if a rebuild starts right after this check, but we don't want to prevent - # concurrent updates entirely. + # If a rebuild starts right after this check, it will already have the updated data, so this is not a problem. _wait_index_rebuild_lock(INDEX_NAME) client = _get_meilisearch_client()