<p>I was hoping for some DB-equivalent of fsck that would spot the problem. Otherwise, it's extract all the names in the supposedly-sorted order of the index, and then check with code outside the database that they are indeed sorted by the expected criteria and there's no adjacent duplicates. Just wondering if the corruption can happen again, and how to notice it as detecting it soon after it happens might help narrow down the cause.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2142#issuecomment-463418418">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLXtrssEhjov0SpYwFh1mvdXlxW33ks5vNJ-ugaJpZM4a5tS-">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLXsQ9-rUqO6O_kuPhx9REyBjWcAVks5vNJ-ugaJpZM4a5tS-.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@RalphCorderoy in #2142: I was hoping for some DB-equivalent of fsck that would spot the problem. Otherwise, it's extract all the names in the supposedly-sorted order of the index, and then check with code outside the database that they are indeed sorted by the expected criteria and there's no adjacent duplicates. Just wondering if the corruption can happen again, and how to notice it as detecting it soon after it happens might help narrow down the cause."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2142#issuecomment-463418418"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2142#issuecomment-463418418",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2142#issuecomment-463418418",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>