Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use after_commit callbacks for real-time changes. #1204

Merged
merged 3 commits into from Aug 19, 2021
Merged

Conversation

pat
Copy link
Owner

@pat pat commented Aug 19, 2021

This also applies to deletions generally (no matter what type of indices are in play).

This was prompted by feedback from @krauselukas in #1203. It certainly makes more sense to wait until the database changes are fully committed before we update Sphinx, so I feel like this switch is a smart one.

This can vary depending on engine/version, and it really doesn't matter.
I don't know why this was an issue on my machine, but not in CI.
Prompted by #1203. It certainly makes more sense to wait until the
database changes are fully committed before we update Sphinx.

Testing real-time indices with transactional fixtures should continue to
work, because Sphinx is being updated via the Rails apps, rather than
by talking to the database directly (the latter being the case for
SQL-backed indices).
@pat pat merged commit c90a10a into develop Aug 19, 2021
@pat pat deleted the realtime-after-commit branch December 21, 2021 03:07
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.

None yet

1 participant