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

Allow replicator application to always update replicator docs #738

Merged
merged 1 commit into from Aug 3, 2017

Conversation

Projects
None yet
2 participants
@nickva
Contributor

nickva commented Aug 3, 2017

Previously when updating the document with the error or failed states
the document body will not pass the validation function and will
consequently crash either the scheduler or the doc processor.

Allow replicator application to always update replicator docs
Previously when updating the document with the error or failed states
the document body will not pass the validation function and will
consequently crash either the scheduler or the doc processor.
@davisp

This comment has been minimized.

Show comment
Hide comment
@davisp

davisp Aug 3, 2017

Member

Why won't it pass the validation function? Seems kinda wrongish to just let the replicator do anything.

Member

davisp commented Aug 3, 2017

Why won't it pass the validation function? Seems kinda wrongish to just let the replicator do anything.

@nickva

This comment has been minimized.

Show comment
Hide comment
@nickva

nickva Aug 3, 2017

Contributor

It might be invalid if user already had a document which is malformed, they updated to the new code and replicator is trying to update their document indicating to the user their document is malformed. But it can't update because the VDU is too strict.

And it crashes the replicator application...

The alternative could be to catch and log the error but then the user might never find out about it

Contributor

nickva commented Aug 3, 2017

It might be invalid if user already had a document which is malformed, they updated to the new code and replicator is trying to update their document indicating to the user their document is malformed. But it can't update because the VDU is too strict.

And it crashes the replicator application...

The alternative could be to catch and log the error but then the user might never find out about it

@davisp

This comment has been minimized.

Show comment
Hide comment
@davisp

davisp Aug 3, 2017

Member

Aha. Fair enough. And once we write an error we never touch it again so it doesn't matter what state we leave it in, right?

+1

Member

davisp commented Aug 3, 2017

Aha. Fair enough. And once we write an error we never touch it again so it doesn't matter what state we leave it in, right?

+1

@nickva

This comment has been minimized.

Show comment
Hide comment
@nickva

nickva Aug 3, 2017

Contributor

It depends on the update_docs compatibility option. If that is enabled then we'd be updating the document with the error state like before then retrying again. If it is disabled then we'd only updated the document with the failed and completed states. Both of which are terminal and after that we forget about that document.

Contributor

nickva commented Aug 3, 2017

It depends on the update_docs compatibility option. If that is enabled then we'd be updating the document with the error state like before then retrying again. If it is disabled then we'd only updated the document with the failed and completed states. Both of which are terminal and after that we forget about that document.

@nickva nickva merged commit 1ba4208 into apache:master Aug 3, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@nickva nickva deleted the cloudant:allow-replicator-to-update-replicator-docs branch Aug 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment