Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
function getListOfPossibleCores should allow the ".default" solr cores as well.
like 'WXYZ-12345.dev.default'.
Comment | File | Size | Author |
---|---|---|---|
#34 | 2871721-for-2x-branch-34.patch | 5.53 KB | bkosborne |
#31 | 2871721-31.patch | 6.22 KB | japerry |
#29 | acquia_connector-2871721-29.patch | 1.64 KB | VishnuTRZ |
#28 | acquia_connector-2871721-27.patch | 1.64 KB | VishnuTRZ |
| |||
#26 | acquia_connector-2871721-26.patch | 5.8 KB | VishnuTRZ |
Comments
Comment #2
vaibhavjainAdding the patch here.
Comment #3
vaibhavjainComment #4
vaibhavjainAdding updated patch. Moved the code in if condition.
Comment #5
vaibhavjainThe earlier patch was bad. Updating the patch
Comment #7
janusman CreditAttribution: janusman at Acquia commentedI see the rationale for this... but the reality is that we want to avoid pollution at all costs, unless you are doing a override.
If we allowed ".default" by... well... default, then if you had a site at sites/default and sites/site1 ... then the "site1" site would wreck your "default" site's data.
An override (see https://docs.acquia.com/acquia-search/multiple-cores/override ) will let you use a .default-named core if you wanted to.
Comment #8
janusman CreditAttribution: janusman at Acquia commentedSince it looks like a few people are using this patch specifically for Site Factory sites, here is an updated version with slightly more protective logic:
This should avoid a non-production ACSF site from corrupting production site's data.
The remaining problem, is that a site admin needs to manage the
search_api_solr.settings:site_hash
value on each and every site to ensure that it is different to avoid data pollution.Comment #9
janusman CreditAttribution: janusman at Acquia commentedHere's the patch.
Comment #10
janusman CreditAttribution: janusman at Acquia commentedChanging issue title based on (long-ago-) discussion with original submitter.
Comment #11
Dane Powell CreditAttribution: Dane Powell at Acquia commentedOn our particular subscription, our production search core is named like WXYZ-12345 instead of WXYZ-12345.01live.default like this patch expects. Note that our dev/stage cores are named according to the expected pattern (WXYZ-12345.01dev.default). Is this unique to our subscription, or should the patch take into account this variation?
Comment #12
Dane Powell CreditAttribution: Dane Powell at Acquia commentedI tested #9 on our ACSF subscription and it did not work. The reason is that our production search core has no suffix (i.e. WXYZ-12345) as described in #10.
I confirmed with the search team that at least for new subscriptions, that's the correct naming convention (no environment or db suffix in ACSF prod). You might want to verify that that's the case for your own subscription as well.
It actually looks like the Search module attempts to correctly handle this case already but fails because the AH_PRODUCTION environment variable isn't defined in ACSF. So the patch is actually somewhat similar than in #9, it just has to fix that bug.
I'm also updating the issue title to reflect the nature of the bug rather than the potential solution.
Comment #13
Dane Powell CreditAttribution: Dane Powell at Acquia commentedWhoops... #12 fails in non-ACSF prod environments because the server variable isn't defined. Additionally, in ACSF non-prod environments it might connect to a production core, which isn't good. This patch fixes those things and I've verified that it works as expected.
Comment #14
weynhamzPatch that works.
Comment #15
weynhamzPatch #14 is actually duplicate of #13. Remove.
Comment #16
weynhamzIt looks like AH_REALM environment variable is set on all environments, can not to be used to determine if it is production.
Comment #17
janusman CreditAttribution: janusman at Acquia commentedTagging accordingly to previous comment.
Comment #18
janusman CreditAttribution: janusman at Acquia commentedNew patch for review:
The rules are... for Site Factory sites, these core names are acceptable:
Comment #19
janusman CreditAttribution: janusman at Acquia commented.. and the patch!
Comment #20
janusman CreditAttribution: janusman at Acquia commentedNew patch for review; now with tests and fixed for proper detection of the various ACSF realms.
Comment #22
weynhamz@janusman, your second patch #20 depends on your patch #19, it can not be applied against the 8.x-1.x HEAD.
Comment #23
weynhamzFrom comment https://www.drupal.org/project/acquia_connector/issues/2871721#comment-1...,
Does ACSF have special handling for this hash value? What's the suggested solution, any thought?
Comment #24
lcatlett CreditAttribution: lcatlett commentedAs mentioned in #22, the patches in #19 and #20 are dependent on one another. Additionally, they only apply to version 1.16 of Acquia Connector rather than the latest release (1.18) or 8.x-1.x HEAD. Here is a new patch for version 1.16 of the module. Will post a patch that applies cleanly to 8.x-1.x HEAD in a separate comment.
Comment #25
lcatlett CreditAttribution: lcatlett commentedAs mentioned in #24, here is a patch that applies cleanly against 8.x-1.x HEAD.
Comment #26
VishnuTRZ CreditAttribution: VishnuTRZ as a volunteer and commentedThe Patch #25 causing error for the Acquia connector version 8.x-1.21. The variables name are changes which is mismatch in the custom function in the patch addACSFFallbackCores.
So the default core is not set in the $possible_core_ids.
updated the patch which now works for default core as well.
Comment #28
VishnuTRZ CreditAttribution: VishnuTRZ as a volunteer and commentedComment #29
VishnuTRZ CreditAttribution: VishnuTRZ as a volunteer and commentedAdded the proper comment number in the patch file.
Comment #30
govind.maloo CreditAttribution: govind.maloo at Salsa Digital commentedComment #31
japerryRolls in the code from #29 with the tests from #25.
Comment #33
japerryComment #34
bkosborneHere's a patch for the 2.x branch of the Acquia Search standalone module. The module was recently removed from the Acquia Connector 3.x branch, so anyone upgrading to that version of Acquia Connector will need use the 2.x version of the standalone module and this patch.
Comment #35
gaurav_manerkar CreditAttribution: gaurav_manerkar as a volunteer commentedhi,
what about 3.x version of Acquia search ?
Comment #36
janusman CreditAttribution: janusman at Acquia commentedGaurav, you can override the Solr index to use at run-time in settings.php. See the README.txt for how.
Comment #37
iampuma#34 confirmed to apply to the 2.x branch of the standalone Acquia Search module. Thanks!
Comment #38
japerry