I performed both the 2.30 and 2.31 upgrades in the last couple of weeks. I did run into the problem with the database search table getting an "_1" added to it, but resolved that issue and had both the node and user searches working fine in my 2.31 version. This morning I ran the upgrade to 2.32 and had a few issues during drush updb and a couple of problems on drush fra -y as well. I will outline those below. After a few tries, I got through all the updates except one. After two tries, I had a clean drush fra -y. Now I am unable to index nodes or users and trying to index them causes errors. In an effort to provide all necessary info, here's what I found.

First the drush updb errors:
On the first pass

SQLSTATE[23000]: Integrity constraint violation: [error]
1062 Duplicate entry '1-title-any' for key
'PRIMARY'
Performed update: search_api_db_update_7104      [ok]
Table search_api_task already exists.            [error]
Performed update: search_api_update_7116         [ok]
Performed update: panopoly_magic_update_7101     [ok]
'all' cache was cleared.  						 [success]

On the second pass:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate [error]
entry '3-name-everybody' for key 'PRIMARY'
Performed update: search_api_db_update_7104                     [ok]
Table search_api_task already exists.                           [error]
Performed update: search_api_update_7116                        [ok]
'all' cache was cleared.                                        [success]
Finished performing updates.                                    [ok]

On the third pass:

Performed update: search_api_db_update_7104                     [ok]
Performed update: search_api_db_update_7105                     [ok]
Table search_api_task already exists.                           [error]
Performed update: search_api_update_7116                        [ok]
Performed update: search_api_db_update_7106                     [ok]
WD search_api: SearchApiException while updating the fields of  [error]
index Database Node Index on server Database Server:
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'default.search_api_db_database_node_index_text' doesn't exist
in SearchApiDbService->fieldsUpdated() (line 688 of
/server/core/openatrium-7.x-2.32/profiles/openatrium/modules/contrib/search_api_db/service.inc).
Performed update: panopoly_search_update_7005                   [ok]
'all' cache was cleared.                                        [success]
Finished performing updates.                                    [ok]

On the fourth pass, down to one error. Subsequent passes (5&6) were the same as fourth:

[LOCAL] vagrant@intranet:default (Upgrade_to_7.x-2.32 *%)$ drush updb
 Search_api  7116  Transfers the tasks for disabled servers to a separate
                   database table.
 Search_api  7117  Checks the database for illegal
                   {search_api_index}.server values.
Do you wish to run all pending updates? (y/n): y
Table search_api_task already exists.                           [error]
Performed update: search_api_update_7116                        [ok]
'all' cache was cleared.                                        [success]
Finished performing updates.                                    [ok]

Then drush fra -y
First pass:

The following modules will be reverted: panopoly_widgets, command_buttons, panopoly_core, panopoly_pages, oa_core, panopoly_search, trash_flag, panopoly_users, oa_panopoly_users, oa_users
Do you really want to continue? (y/n): y
Reverted panopoly_widgets.field_base.                           [ok]
Reverted command_buttons.field_base.                            [ok]
Reverted panopoly_core.field_base.                              [ok]
WD php: PDOException: SQLSTATE[40001]: Serialization failure:   [error]
1213 Deadlock found when trying to get lock; try restarting
transaction: DELETE FROM {cache_field}
WHERE  (cid LIKE :db_condition_placeholder_0 ESCAPE '\\') ;
Array
(
    [:db_condition_placeholder_0] => field\_info\_types:%
)
 in cache_clear_all() (line 167 of
/server/core/openatrium-7.x-2.32/includes/cache.inc).
Cannot modify header information - headers already sent by      [warning]
(output started at /usr/share/pear/drush/includes/output.inc:38)
bootstrap.inc:1233
PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: DELETE FROM {cache_field}
WHERE  (cid LIKE :db_condition_placeholder_0 ESCAPE '\\') ; Array
(
    [:db_condition_placeholder_0] => field\_info\_types:%
)
 in cache_clear_all() (line 167 of /server/core/openatrium-7.x-2.32/includes/cache.inc).
Drush command terminated abnormally due to an unrecoverable     [error]
error.

Second pass ran through clean.

Errors when indexing the searches: (screenshot attached) Most recent first.
SearchApiException: Could not index items since important pending server tasks could not be performed. in search_api_index_specific_items() (line 1511 of /server/core/openatrium-7.x-2.32/profiles/openatrium/modules/contrib/search_api/search_api.module).

SearchApiException while deleting items from server Database Server: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.search_api_db_database_node_index_text' doesn't exist in SearchApiDbService->deleteItems() (line 1111 of /server/core/openatrium-7.x-2.32/profiles/openatrium/modules/contrib/search_api_db/service.inc).

SearchApiException while updating the fields of index Database Node Index on server Database Server: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.search_api_db_database_node_index_text' doesn't exist in SearchApiDbService->fieldsUpdated() (line 688 of /server/core/openatrium-7.x-2.32/profiles/openatrium/modules/contrib/search_api_db/service.inc).

When I run mysql> show tables like '%search%';

+----------------------------------------------------------------+
| Tables_in_default (%search%)                                   |
+----------------------------------------------------------------+
| cache_search_api_solr                                          |
| search_api_db_database_node_index                              |
| search_api_db_database_node_index_author                       |
| search_api_db_database_node_index_body_summary                 |
| search_api_db_database_node_index_body_value                   |
| search_api_db_database_node_index_created                      |
| search_api_db_database_node_index_field_oa_related_1           |
| search_api_db_database_node_index_field_oa_related_field_par_1 |
| search_api_db_database_node_index_field_oa_related_field_parag |
| search_api_db_database_node_index_field_oa_related_snippet_b_1 |
| search_api_db_database_node_index_field_oa_related_snippet_bod |
| search_api_db_database_node_index_nid                          |
| search_api_db_database_node_index_oa_section_ref_title         |
| search_api_db_database_node_index_og_group_ref_title           |
| search_api_db_database_node_index_search_api_access_node       |
| search_api_db_database_node_index_search_api_language          |
| search_api_db_database_node_index_search_api_url               |
| search_api_db_database_node_index_search_api_viewed            |
| search_api_db_database_node_index_status                       |
| search_api_db_database_node_index_text_1                       |
| search_api_db_database_node_index_text_2                       |
| search_api_db_database_node_index_text_3                       |
| search_api_db_database_node_index_title                        |
| search_api_db_database_node_index_type                         |
| search_api_db_database_node_index_url                          |
| search_api_db_user_index                                       |
| search_api_db_user_index_field_user_display_name               |
| search_api_db_user_index_field_user_display_name_1             |
| search_api_db_user_index_field_user_display_name_2             |
| search_api_db_user_index_field_user_display_name_3             |
| search_api_db_user_index_field_user_display_name_4             |
| search_api_db_user_index_mail                                  |
| search_api_db_user_index_mail_1                                |
| search_api_db_user_index_mail_2                                |
| search_api_db_user_index_mail_3                                |
| search_api_db_user_index_mail_4                                |
| search_api_db_user_index_name                                  |
| search_api_db_user_index_name_1                                |
| search_api_db_user_index_name_2                                |
| search_api_db_user_index_name_3                                |
| search_api_db_user_index_name_4                                |
| search_api_db_user_index_og_user_node                          |
| search_api_db_user_index_og_user_node_1                        |
| search_api_db_user_index_og_user_node_2                        |
| search_api_db_user_index_og_user_node_3                        |
| search_api_db_user_index_og_user_node_4                        |
| search_api_db_user_index_og_user_node_5                        |
| search_api_db_user_index_search_api_language                   |
| search_api_db_user_index_search_api_language_1                 |
| search_api_db_user_index_search_api_language_2                 |
| search_api_db_user_index_search_api_language_3                 |
| search_api_db_user_index_search_api_language_4                 |
| search_api_db_user_index_search_api_url                        |
| search_api_db_user_index_search_api_url_1                      |
| search_api_db_user_index_search_api_url_2                      |
| search_api_db_user_index_search_api_url_3                      |
| search_api_db_user_index_text                                  |
| search_api_db_user_index_text_1                                |
| search_api_db_user_index_text_2                                |
| search_api_db_user_index_text_3                                |
| search_api_db_user_index_uid                                   |
| search_api_db_user_index_url                                   |
| search_api_index                                               |
| search_api_item                                                |
| search_api_server                                              |
| search_api_task                                                |
| search_dataset                                                 |
| search_index                                                   |
| search_node_links                                              |
| search_total                                                   |
+----------------------------------------------------------------+
70 rows in set (0.01 sec)
CommentFileSizeAuthor
2.32-search-errors.png277.89 KBnrackleff

Comments

nrackleff’s picture

If I do a fresh install using drush si openatrium, both searches work and when I runmysql> show tables like '%search%';

+----------------------------------------------------------+
| Tables_in_default (%search%)                             |
+----------------------------------------------------------+
| cache_search_api_solr                                    |
| search_api_db_database_node_index                        |
| search_api_db_database_node_index_field_oa_related       |
| search_api_db_database_node_index_oa_section_ref_title   |
| search_api_db_database_node_index_og_group_ref_title     |
| search_api_db_database_node_index_search_api_access_node |
| search_api_db_database_node_index_text                   |
| search_api_db_user_index                                 |
| search_api_db_user_index_name                            |
| search_api_db_user_index_og_user_node                    |
| search_api_db_user_index_search_api_language             |
| search_api_db_user_index_search_api_url                  |
| search_api_db_user_index_text                            |
| search_api_index                                         |
| search_api_item                                          |
| search_api_server                                        |
| search_api_task                                          |
| search_dataset                                           |
| search_index                                             |
| search_node_links                                        |
| search_total                                             |
+----------------------------------------------------------+
21 rows in set (0.00 sec)

I can't afford to wipe out my entire site and start from scratch though. Just wanted to let you know this works on fresh install, but not on upgrade.

nrackleff’s picture

Issue summary: View changes
joevagyok’s picture

I'm also still having issues with the search:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atrium-adam.search_api_db_user_index_name' doesn't exist

is WD search_api: SearchApiException while removing index Solr User     [error]
Index from server Solr Server: "0" Status: Request failed: Connection
refused in SearchApiSolrConnection->checkResponse() (line 541 of
/var/www/atrium-adam/profiles/openatrium/modules/contrib/search_api_solr/includes/solr_connection.inc).

I re-installed the search modules with devel but still the same if I try to search user. Files or folders are also could not be found.

Thanks

jkingsnorth’s picture

Status: Active » Closed (duplicate)
Related issues: -#2434487: Upgrading gives search_api table not found error