clear-code / redmine_full_text_search

Full text search for Redmine
MIT License
61 stars 24 forks source link

If there is an inconsistency in the DB contents, the synchronization process may end abnormally #64

Closed y503unavailable closed 5 years ago

y503unavailable commented 5 years ago

If there is an inconsistency in the DB contents, the process may end abnormally during the synchronization process. I think that it is better not to process in the record where the reference destination does not exist.

This phenomenon occurs in Redmine, in which data inconsistency occurs in DB contents. (Inconsistent DB content, but normal operation of Redmine can be done without problems)

Operating environment

Redmine3.4.6 (CentOS7 MariaDB 5.5.60) fulltextsearch0.8.1


Example The deleted issueID remains in the custom_value table.

During the process of synchronize There is no issue that corresponds to customized_id of custom_value. Abnormal termination without acquiring project of issue.

Error occurrence point redmine_full_text_search/lib/full_text_search/custom_value_mapper.rb

    searcher_record.project_name = @record.customized.project.name

Other than the above, also in the following cases, it ended abnormally similarly.

After deleting the above abnormal data and performing synchronize, it worked normally.

I'm impressed by the super fast full text search. Thank you.


Note

It seems that this trouble does not occur with normal Redmine. I introduced a full text search plug-in to two Redmines, and this problem only occurred with one. (Both have over 50,000 tickets)

The server where this trouble occurred, performed server consolidation work of Redmine 5 years ago. I did not delete customvalue etc. which became unnecessary at this time. So far, no problems have occurred for 5 years.

Implementation details for server consolidation (reference) https://www.slideshare.net/y503unavailable/redmine-42182169

I think it would be better if Redmine had a function to check data integrity.

kou commented 5 years ago

Thanks for your report. I'll add the feature later.

I may ask you for providing how to create these broken cases.

kou commented 5 years ago

I've add some checks but I'm not sure that they cover all cases. If you find more cases, please open a new issue.