Connectivity issues during indexing are getting surpressed

Created on 7 February 2022, over 2 years ago
Updated 12 March 2024, 3 months ago

Problem/Motivation

Search API does not seem to properly handle errors that stem from connectivity issues during indexing.

For example, with the ElasticSearch Connector, if the configured endpoint is unavailable, Search API marks all nodes as indexed in its tracker even though no content ever made it to the search index.

Here's an example of the log output:

>  [notice] Successfully indexed 10250 items.
>  [notice] Successfully indexed 10300 items.
>  [notice] Successfully indexed 10350 items.
>  [notice] Successfully indexed 10379 items.
>  [error]  Message: No alive nodes found in your cluster
>
>  [notice] Message: Successfully indexed 10379 items.
>

The ElasticSearch server URL was configured to point to an ElasticSearch container that was stopped.

Steps to reproduce

1) Reset the search index.
2) Configure ElasticSearch Connector to point to a dead cluster.
3) Run `drush sapi-i`.

Proposed resolution

Search API should properly handle exceptions thrown by different search backends and not mark the tracker as up to date when indexing fails.

πŸ› Bug report
Status

Postponed: needs info

Version

8.0

Component

Code

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

    We already do that. It seems the Elasticsearch backend plugin didn’t properly report the failed indexing operation.
    Also, the code you linked is for deleting items, not indexing. Indexing works differently – but in neither case do we mark tasks as successful if there was an exception.

  • First commit to issue fork.
  • Status changed to Postponed: needs info 3 months ago
  • πŸ‡¨πŸ‡¦Canada mparker17 UTC-4

    In πŸ“Œ Investigate search_api_opensearch as base for elasticsearch_connector Fixed , we changed how this module connects to the ElasticSearch cluster... Search API now connects to it directly. We didn't see any indexing problems during manual testing.

    May we trouble you to try out the latest 8.0.x-dev release β†’ and see if it fixes this problem? If it does not, may we trouble you to change this issue's "Status" back to "Needs work"?

    (I'm cleaning up issues in the 8.0.x-dev branch as part of a big review of open issues for 🌱 Plan for 8.0.0-alpha release Active : thank you for your patience with me!)

Production build 0.69.0 2024