Problem/Motivation

Hello,

I was testing elasticsearch_connector update to v8.0.0-alpha2, and our DTT tests completely unrelated to search are failing after the update. I was debugging the issue, and the failure is caused by search_api_entity_delete hook, which is triggered when a test deletes a node. This eventually triggers NoNodeAvailableException, since we are not running elasticsearch on our CI.

I would argue that exception handlers like this should also catch Elastic\Transport\Exception\TransportException, so if the elasticsearch is not available, the exception would be handled withing search_api and elasticsearch_connector.

In my case, the NoNodeAvailableException is finally caught in SqlContentEntity::delete and transformed into a EntityStorageException.

Steps to reproduce

Make sure elasticsearch is not available. Delete an entity that tracked by search_api.

Proposed resolution

Handle Elastic\Transport\Exception\TransportException exceptions in BackendClient.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release — released in 8.0.0-alpha4

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

huhhuh created an issue. See original summary.

huhhuh’s picture

Status: Active » Needs review
huhhuh’s picture

huhhuh’s picture

Issue summary: View changes

sokru made their first commit to this issue’s fork.

  • sokru committed b80d5731 on 8.0.x authored by huhhuh
    Issue #3486375 by huhhuh: Exception handlers do not handle...
sokru’s picture

Status: Needs review » Fixed

Thanks, looks good!

sokru’s picture

mparker17’s picture

Assigned: huhhuh » Unassigned

Unassigning, now that it is complete.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mparker17’s picture

Issue summary: View changes

Updated remaining tasks