Fix deadlocks during search tests.

Review Request #12053 — Created Feb. 12, 2022 and submitted

david
Review Board
release-5.0.x
reviewboard

Search tests which used on-the-fly indexing were hitting deadlocks under
the new haystack version. The problem here was that our indexing
templates were calling get_profile, which would end up creating new
profile objects if they didn't already exist. This would attempt to
write from inside the indexer stack, which would hit a lock.

I've added a new helper that can check if a profile is public without
creating ones that don't exist. Other related code has been updated to
use this new helper appropriately instead of reinventing the wheel.

Ran unit tests.

Summary
Fix deadlocks during search tests.
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to django-3.2 (8e4da7f)
Loading...