Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fail complete reindex when one object fails #964

Merged
merged 1 commit into from
Oct 11, 2016

Conversation

smith
Copy link
Contributor

@smith smith commented Oct 11, 2016

There are cases when we do a reindex where the object name in the
serialized JSON does not match the name we get when selecting (id, name) from
the database.

Currently when this lookup fails, the entire reindex crashes. This
change makes it so that if we fail to find the name, instead of failing
entirely, we output a list of objects that failed to reindex to the
user.

img

%% Since we get here via valid `Index', we don't have to check that the objects are
%% indexable.
oc_chef_object_db:add_to_solr_async(StubRec, PreliminaryEJson),
[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the unmodified MissingList getting returned - otherwise we empty our existing list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest commit.

@smith smith force-pushed the nls/SPOOL-388/reindex-continue branch 2 times, most recently from 57900d8 to 2a16cab Compare October 11, 2016 18:37
There are cases when we do a reindex where the object name in the
serialized JSON does not match the name we get when selecting `(id, name)` from
the database.

Currently when this lookup fails, the entire reindex crashes. This
change makes it so that if we fail to find the name, instead of failing
entirely, we output a list of objects that failed to reindex to the
user.

Signed-off-by: Nathan L Smith <[email protected]>
@smith smith force-pushed the nls/SPOOL-388/reindex-continue branch from 2a16cab to 1d68f9a Compare October 11, 2016 18:54
@smith smith merged commit f9f44b3 into master Oct 11, 2016
@smith smith deleted the nls/SPOOL-388/reindex-continue branch October 11, 2016 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants