Repository navigation
handle rt and plain indices the same - #1249
Merged
Merged
Conversation
akostadinov
marked this pull request as draft
August 3, 2023 19:55
akostadinov
commented
Aug 10, 2023
| let(:index_a) { double 'Index A', :model => model_a, :type => 'plain', | ||
| :sources => [double(:fields => [field_a1, field_a2])] } | ||
| let(:index_b) { double 'Index B', :model => model_a, :type => 'rt', | ||
| let(:index_b) { double 'Index B', :model => model_b, :type => 'rt', |
Contributor
Author
There was a problem hiding this comment.
This got me in trouble originally. index_a should use model_a and index_b should use model_b as far as I understand the intention of the test case.
Owner
There was a problem hiding this comment.
As much as I can tell, yes, I think you're right! Thanks for this PR :)
akostadinov
marked this pull request as ready for review
August 10, 2023 14:28
akostadinov
added a commit
to akostadinov/porta
that referenced
this pull request
Sep 13, 2025
Sometimes after start-up Sidekiq pods produce ThinkingSphinx::QueryError > unknown column: 'sphinx_internal_class_name' - REPLACE INTO account_core (id, `sphinx_internal_class_name`, `name`, `account_id`, `username`, `user_full_name`, `email`, `user_key`, `app_id`, `app_name`, `user_id`, `sphinx_internal_id`, `sphinx_internal_class`, `sphinx_deleted`, `sphinx_updated_at`, `provider_account_id`, `tenant_id`, `state`) VALUES (14978, 'Account', 'org_name-lkdjfggf-serch-yyith8w', '156', 'username-lkdjfggf-serch-xskw25c', ' ', 'username-lkdjfggf-serch-xskw25c@anything.invalid', 'af61253a5933dd9ba30bebb6661d16d1 ede2926ef59ecdc45da4a8960164ffc2', '3173be1c fc507eb9', 'org_name-lkdjfggf-serch-yyith8w's App ui_accou-lkdjfggf-accont-vmt8wba', '180', 156, 'Account', 0, 1697580778, 2, 2, 'approved') A potential cause for this is load order of thinking-sphinx indices vs the monkey patch we are removing here. Since we use thinking-sphinx 5.5 which has this logic alread merged in pat/thinking-sphinx#1249 , we can just remove the monkey patch and a race condition should not have any opportunit to happen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
because of my oversight in #1222 all rt indices lost the
sphinx_internal_class_namefield and this is not correct. In either index type, when single table inheritance is used, thensphinx_internal_class_nameshould be present. Now also added a test for it - to make sure both index types are handled.