Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def _can_wait_for_indexes_with_load_after_save_changes_internal(self, all_indexe
related.value = 42
session.save_changes()

# MyIndex references related/A via LoadDocument, so updating it marks the
# index stale asynchronously. Guard the assertion against that reference-
# reindex race the same way the first query is guarded by wait_for_indexing
# above; otherwise the query can observe the stale value (21.5) intermittently.
self.wait_for_indexing(self.store)

# assert
with self.store.open_session() as session:
result = session.query_index_type(MyIndex, MyIndex.Result).select_fields(MyIndex.Result).single()
Expand Down
Loading