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

Add tombstone records for deleted documents #1106

Open
MatMoore opened this issue Dec 18, 2017 · 0 comments
Open

Add tombstone records for deleted documents #1106

MatMoore opened this issue Dec 18, 2017 · 0 comments
Labels

Comments

@MatMoore
Copy link
Contributor

From https://trello.com/c/ap5pQF5R/20-add-tombstone-records-for-deleted-documents

In the new govuk index, an unpublishing (non-withdawn) message causes rummager to delete the document from the index. This can lead to a race condition if a publishing and unpublishing message arrive out of order.

If a publisher publishes and then immediately unpublishes a document, but the unpublishing message arrives first, the document will be removed from the index. Then the stale publishing message arrives, so rummager will incorrectly re-add the document to the index.

We could avoid this by adding temporary "tombstone" records when a document is deleted, i.e. keep the document in the index with a flag marking it as unpublished. The document will be removed when the index is next recreated, but while it exists it would prevent the document from being republished because Elasticsearch's versioning would cause the stale write to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant