rewrite logic of fetching solr cores in Acquia Search

Created on 20 March 2024, 3 months ago
Updated 17 April 2024, 2 months ago

Problem/Motivation

The current system of overriding the core is a bit messy. The preferred core service was originally designed to work with a single Search API server. Many customers create multiple servers per site and override them with a myriad of settings configs.

Unfortunately a side effect of using settings.php causes multiple issues:
* Overriding cores per environment instead of using default core lookups
* Read Only getting set to FALSE, causing core poisoning from dev/test environments
* Potential poisoning of additional cores due to read_only being a global instead of core specific setting.

Proposed resolution

To fix these issues, the logic for selecting and configuring cores should be changed, preferably while giving backwards compatibility so users can upgrade as a minor update without seeing regressions in production.

Likely this change will be big enough to warrant a 3.2 release.

These changes include:
* Moving the 'default server' to acquia_search_defaults. The index and view is already there, and by moving the server there, it would become optional.
* Only perform automatic core detection per environment on the default core, making automatic detection also optional.
* Allowing admins to configure as many servers as needed in Search API by adding a dropdown of available cores to their subscription
* Setting 'prod' and 'default' cores as read-only if certain acquia environment variables are missing.
* Retain the 'local override' functionality so additional servers could theoretically be changed via code.
* The existing read-only acquia search setting will only change the default server.
* Add logic allowing read-only mode to be set or removed on a per server basis.

Remaining tasks

Continue work on the default server selection core within the PreferredCoreService
New tests

User interface changes

Addition of server selection on the Acquia search server edit page

Feature request
Status

Fixed

Version

3.2

Component

Code

Created by

🇺🇸United States japerry KVUO

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

Merge Requests

Comments & Activities

  • Issue created by @japerry
  • Pipeline finished with Failed
    3 months ago
    Total: 492s
    #123909
  • Pipeline finished with Success
    3 months ago
    Total: 584s
    #124560
  • Pipeline finished with Failed
    3 months ago
    Total: 564s
    #124567
  • Pipeline finished with Failed
    3 months ago
    Total: 421s
    #125898
  • Pipeline finished with Failed
    3 months ago
    Total: 456s
    #129253
  • Pipeline finished with Failed
    3 months ago
    Total: 697s
    #129272
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update 3 months ago
    34 pass, 10 fail
  • Pipeline finished with Failed
    3 months ago
    Total: 475s
    #130199
  • Pipeline finished with Failed
    3 months ago
    Total: 410s
    #131799
  • Pipeline finished with Skipped
    3 months ago
    #131999
    • japerry committed 457637d6 on 3.2.x
      Issue #3432307 by japerry: rewrite logic of fetching solr cores in...
  • Status changed to Fixed 3 months ago
  • 🇺🇸United States japerry KVUO

    This has been committed to the 3.2.x branch.

    There are two logic changes between 3.1 and 3.2, which were expected but not implemented right:

    1) Read Only is supposed to be TRUE in all local cases unless explicitly overridden
    2) Config settings for acquia search get overwritten by configuration in Settings.php. If you previously used config AND settings, you must use only Settings. This will be added to the search documentation as we go through the Search 3.2 beta phase.

  • Pipeline finished with Failed
    3 months ago
    Total: 569s
    #131997
  • Pipeline finished with Failed
    3 months ago
    Total: 515s
    #132014
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇮🇳India deepakkm

    @japerry - when we install site with acquia_search 3.2.x-dev we are getting below error and solr core is not getting attached. Kindly have a look at the screenshot below.

  • 🇮🇳India deepakkm

    Forgot to add another error when we install site or run drush updb

Production build 0.69.0 2024