Mercurial > code > home > repos > rdfdb
changeset 127:a71e4272d808
cut way down on some no-op patches that were causing file rewrites/rereads
author | drewp@bigasterisk.com |
---|---|
date | Sat, 27 May 2023 17:38:13 -0700 |
parents | 1780382477ed |
children | bf5353908f3c |
files | rdfdb/service.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rdfdb/service.py Sat May 27 17:36:51 2023 -0700 +++ b/rdfdb/service.py Sat May 27 17:38:13 2023 -0700 @@ -68,6 +68,12 @@ return log.debug("%r sends patch to us: %s", self, data[:64]) p = Patch(jsonRepr=data) + + # this is very important- I caught clients piling up dozens of retries, causing + # us to rewrite files then notice them, etc. Problem may not be fully solved. + if p.isNoop(): + return + try: await self.db.patch(p, sender=self.connectionId) except ValueError as e: