Affects Version/s: 7.0.0 M3
If a row is missing in the User_ table (but its corresponding entry in the Contact_ table still exists), the Reindex fails immediately instead of completing while still throwing the NoSuchUserExceptions for the missing entry. This is an issue because if there are any orphaned entries, this will cause Reindexing to fail until those entries are cleaned up.. Likewise, since the Reindex only fails on the first missing entry, the logs do not clearly indicate how many orphaned entries there actually are.
Steps to Reproduce:
1. Start Liferay on MySQL database
2. Navigate to Control Panel > Users. Create 2 Users
3. Shutdown Liferay
4. In MySQL Workbench, delete the rows for the 2 newly created Users in the user_ table
5. Clear the App Server cache (e.g. /temp and /work in Tomcat) and restart Liferay
6. Navigate to Control Panel > Server Administration. Select "Reindex All Search Indexes"
The Reindex would finish and the lack of these entries for these Users would throw 2 errors (one for each User) to indicate that there are missing users with corresponding entries existing in the contact_ table
When the Reindex comes across the first missing User in the user_ table, the reindex stops with a NoSuchUserException