Search API Schema reverts back to 4.2 after deploys or randomly

Created on 29 February 2024, 4 months ago
Updated 8 June 2024, 22 days ago

Problem/Motivation

Solr schema reverts back to 4.2 after deploys (and also randomly) when it previously was 4.3.1 after a custom posting. Additionally any new multidevs that spin up do not use the same schema that the dev environment is using.

From Pantheon support:

After discussing this with our engineers I think I have a better understanding of what’s going on, although I’m not sure what might have prompted the schema to revert in these particular cases.

We have identified the problem that has been causing this sticky solr schema issue. There is a bug in the search_api_pantheon module which is sometimes breaking the solr configuration and causing the core to fail to load, causing the schema to revert to 4.2.

Our engineers are working on an update to the search_api_pantheon module to fix this bug and stop this behavior, so look out for an update to that module soon. Unfortunately, we don’t know of a way to completely avoid this problem until the bug fix is available. If you encounter this issue again, your best best is to try reposting the schema first. If reposting the schema fails and it’s still stuck on 4.2, then our engineers will need to manually fix the solr configuration for the site.

Steps to reproduce

I can't consistently reproduce this as it happens on some environments, not all. But I've been struggling for the last month with multiple projects on Pantheon ever since the Search API Solr upgrade to 4.3 and the needing to re-post a compatible schema.

Proposed resolution

Seems like Pantheon is working on this, but I wanted to note this issue on drupal.org since it could be affecting other users and you may not even notice.

Also it would be great if the default schema could be set in the pantheon.yml so it doesn't just revert back to a whatever the default in the case of any errors. Otherwise our customizations are just lost and there's no way flag that this happened until feature sets are just not working.

πŸ› Bug report
Status

Active

Version

8.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nsciacca
  • πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut
  • πŸ‡¬πŸ‡§United Kingdom Sophie.SK

    Ah, I'm so glad you posted this. One of our clients has had this same issue this week, having followed the steps outlined in a Search API Solr issue previously: https://www.drupal.org/project/search_api_solr/issues/3401710 πŸ’¬ Updating to 4.3 Errors Fixed

    It would be good to know what the cause is and when there may be a fix.

  • πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut
  • πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut

    Update: one of our sites randomly reverted back to 4.2.10 on 3/1 even though there was no deploy. This is a huge problem as it prevents new items from being indexed and there's no notice or warning other than our customers reporting missing content.

  • πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut
  • πŸ‡¬πŸ‡§United Kingdom Sophie.SK

    Since this causes a reduction in service for clients, and can happen randomly, I'm raising the priority to "Major".

    Happy to help out testing any patches.

  • πŸ‡ΊπŸ‡ΈUnited States nsciacca Connecticut

    I've been communicating with Pantheon's support staff and they've said:

    Good day, for an update, Pantheon Platform Engineers already released an update to the Search API Pantheon module https://www.drupal.org/project/search_api_pantheon β†’ just today. The latest version 8.1.7 contains fixes for the Sticky Solr Schema.

    I'll be installing this and monitoring on site asap.

  • πŸ‡ΊπŸ‡ΈUnited States Ec1ipsis

    Just a quick heads up, we've released two versions (8.1.7 and 8.1.8) which resolve bugs that caused this issue. Let us know if you still see it after updates!

  • πŸ‡΅πŸ‡­Philippines danreb

    Bumping this up, this is still happening as it seems the default Solr Schema template of Pantheon containers is using Solr Schema 4.2 and that's the reason why creating a new multidev environment is installed with Solr Schema 4.2 instead of the Solr Schema provided by the search_api_solr module.

    Not sure if there is a plan to update the default Solr Schema, or at least fix the reposting of Solr Schema.

  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    We can confirm the Solr Schema on Pantheon (all environments) is 4.2.10 with search_api_pantheon 8.1.8, search_api 8.x-1.34, and search_api_solr 4.3.3

    /admin/config/search/search-api/server/pantheon_solr8 reports the following:
    Schema Version 4.2.10
    Schema drupal-4.2.10-solr-8.x-1
    Minimal required schema version 4.3.0
    Preferred schema version 4.3.3
    Configured Solr Version 8.0.0
    Detected Solr Version 8.11.2

    Per #5 our Solr Schema did not revert from 4.3.1 AFAIK it has been 4.2.10 since we configured our search. Our new content is being indexed on creation. We do have synonyms defined however and those are not working as expected.

  • πŸ‡ΊπŸ‡ΈUnited States dorficus

    To echo what @bsnodgrass mentioned in #11, I did quite a bit of research trying to find what, if anything, was causing the schema to not get fully updated.
    I posted most of my findings on https://www.drupal.org/project/search_api_pantheon/issues/3449701 πŸ’¬ Support for Configuring Synonyms Active , which seems to be related, but the TL;DR is that it appears there is a hidden schema somewhere on the Pantheon platform that is not being overridden by the custom schema that is posted. For more details on my findings, please check the linked issue.

    Until we have access to be able to update the actual config, I don't believe this issue will be solved.

  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    per @danreb on https://www.drupal.org/project/search_api_pantheon/issues/3449701#commen... πŸ’¬ Support for Configuring Synonyms Active

    He confirmed "The default Solr schema in Pantheon platform was set to 4.2.10, currently reposting of Solr Schema on Pantheon was broken (Sticky Solr Schema bug)"

    and recommended. "If you want your custom config to take affect, what you need to do right now is to open a ticket and let the CSE or the platform engineers reposted the config for you in the affected environments."

Production build 0.69.0 2024