<p></p>
<blockquote>
<p>Here's one candidate: reading a message (via GET /message/id) updates the message_read flag:</p>
</blockquote>
<p>That's a perfect example! Thanks for finding it. So we have two things we need to do:</p>
<ul>
<li>Most importantly, figure out how to run the tests so that they use read-only connections when they are using the <code>reading</code> connection. If we don't do this, then there's a risk that the tests will pass and stuff will break in production.</li>
<li>Figure out what to do on a case-by-case basis. I suspect if we just find a few methods like this (where the write to the database is a side effect of a larger purpose that's read only) then we can wrap the line or two in a block that uses the <code>writing</code> connection.</li>
</ul>
<p>If anyone has any suggestions on the first topic, I'm all ears. I've marked this WIP in the meantime.</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/pull/2563#issuecomment-610942481">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNT3U4ZRRE3OKMHTA3RLRX33ANCNFSM4LOVDDGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLNRXTUDLSYCMQ4LOBTRLRX33A5CNFSM4LOVDDG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERVD4EI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-610942481",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-610942481",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>