<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng" -->

---
title: Safe Chunked Execution for Large-Scale Data Updates and...
description: Large-scale database UPDATE and DELETE operations executed as single transactions risk replication lag, high load, and UNDO log bloat. Mercari&#x27;s DBRE team...
canonical: https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Safe Chunked Execution for Large-Scale Data Updates and Deletions | daily.dev
og:description: Large-scale database UPDATE and DELETE operations executed as single transactions risk replication lag, high load, and UNDO log bloat. Mercari&#x27;s DBRE team...
og:url: https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng
og:image: https://api.daily.dev/og/posts/pUcl907nG.png
og:image:alt: Safe Chunked Execution for Large-Scale Data Updates and Deletions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

[Mercari Engineering](https://daily.dev/sources/mercari)

[Read post](https://api.daily.dev/r/pUcl907nG)

# [Safe Chunked Execution for Large-Scale Data Updates and Deletions](https://api.daily.dev/r/pUcl907nG "Go to post")

Large-scale database UPDATE and DELETE operations executed as single transactions risk replication lag, high load, and UNDO log bloat. Mercari's DBRE team built a general-purpose Go tool called data-updater that accepts SQL-like configuration and automatically splits operations into safe, cursor-based batches. Key features include: three operation modes (UPDATE, DELETE, NULL/archive), replica routing for SELECT queries, pessimistic locking, JOIN support, before-SQL hooks for archiving, runtime control via Unix socket (pause, resume, batch size, interval), health-check-based hibernation, auto-interval adjustment based on hibernation ratio, automatic resume via status files, and GCS-based PK source files. The tool draws inspiration from gh-ost's philosophy of runtime operational control. Source code is not open-sourced, but the full README is published so teams can build their own implementation, optionally with generative AI assistance.

[#golang](/tags/golang "Check all #golang posts")[#mysql](/tags/mysql "Check all #mysql posts")

Aug 06•17m read time•From [engineering.mercari.com](https://api.daily.dev/r/pUcl907nG "engineering.mercari.com")

[![Post cover image](https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7d29e67516f44693e6feada9948968b9?_a=AQAEuop)](https://api.daily.dev/r/pUcl907nG "Go to post")

Table of contents

[Challenges with Large-Scale Data Update and Delete Operations](https://api.daily.dev/r/pUcl907nG "Challenges with Large-Scale Data Update and Delete Operations")[Solution: A General-Purpose Tool](https://api.daily.dev/r/pUcl907nG "Solution: A General-Purpose Tool")[README.md for the General-Purpose Data Update Tool](https://api.daily.dev/r/pUcl907nG "README.md for the General-Purpose Data Update Tool")

3.6K Impressions2 Upvotes

Comment

Bookmark

Copy

![Placeholder image for anonymous user](https://media.daily.dev/image/upload/s--qsFuKGv_--/t_logo,f_auto/public/noProfile)Share your thoughtsPost

[![Mercari Engineering's image](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cdde515cd83640748689d74c2d938fcf)](https://daily.dev/sources/mercari)

[Mercari Engineering](https://daily.dev/sources/mercari "https://daily.dev/sources/mercari")

Mercari's platform is a resource for developers and technology enthusiasts, offering insights into e... Read more

32 Followers

•

371 Upvotes

#### Would you recommend this post?

Copy link

WhatsApp

Facebook

X

New Squad

Copy linkShare with your friends

2

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Safe Chunked Execution for Large-Scale Data Updates and Deletions","url":"https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng"},"datePublished":"2026-08-06T00:15:51.464Z","dateModified":"2026-08-06T03:01:11.845Z","description":"Large-scale database UPDATE and DELETE operations executed as single transactions risk replication lag, high load, and UNDO log bloat. Mercari's DBRE team...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7d29e67516f44693e6feada9948968b9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7d29e67516f44693e6feada9948968b9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Mercari Engineering","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Mercari Engineering","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cdde515cd83640748689d74c2d938fcf","url":"https://daily.dev/sources/mercari"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/safe-chunked-execution-for-large-scale-data-updates-and-deletions-pucl907ng","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"golang,mysql","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Mercari Engineering","item":"https://daily.dev/sources/mercari"},{"@type":"ListItem","position":3,"name":"Safe Chunked Execution for Large-Scale Data Updates and Deletions"}]}
```

