---
schema_version: "1"
id: 365cae5ee77b7c453507667268ff838cdc53e1b7c41296f4582de5377222dd4b
title: Manage Row Locks with Related Record Writeback
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/dpe_configure_rowlock.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.dpe_configure_rowlock.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 54bba590b6b9316ef58e57c8a81c4361cad0f03b7b366abfb1336743a3ad5335
description: Use Related Record Writeback in Data Processing Engine (DPE) to reduce row lock errors when writing large volumes of child records. This feature is only applicable for definitions having Data 360 runtime.
products:
  - Cross Cloud
release: "264"
---
# Manage Row Locks with Related Record Writeback

Use Related Record Writeback in Data Processing Engine (DPE) to reduce row lock errors when writing large volumes of child records. This feature is only applicable for definitions having Data 360 runtime.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=ind.dpe_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported editions and availability for Data Processing Engine (DPE).">View supported editions</a>.</td></tr></tbody></table>

## What Is Row Lock?

DPE uses Salesforce Bulk API 2.0 to write records in parallel. When multiple concurrent batches attempt to insert or update child records that reference the same parent record, Salesforce locks the parent record to maintain data integrity.

## How the Related Record Writeback Setting Works

Only one batch can acquire the lock at a time. If other batches containing child records for that same parent can't acquire the lock within 10 seconds, the batch fails. These failures lead to inconsistent write outcomes and limited scalability. The Related Record Writeback setting automatically groups and processes data sequentially to avoid parent-level locking issues.

- Optimize For Row Lock Flag: Applies parent-based partitioning before the writeback when the Optimize writeback to prevent row lock errors flag is true.
- Parent ID Grouping: Processes data of all children of a parent in the same Bulk API 2.0 job by grouping data by parent.
- 10,000 Record Limit: Limits batch jobs to 10,000 records. Bulk API 2.0 processes batches of this size in a single thread, which prevents internal splits that cause row locks.
- Sequential and Parallel Batch Run:
    - Same parent: Processes partitions of the same parent records sequentially. If a parent has more than 10,000 records, the next batch begins only after the previous one completes.
    - Different parents: Processes independent parent record groups in parallel across multiple threads to maintain high throughput.

![Row lock configuration details](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-data_processing_engine-264-0-0-production-enus/80e06924-e6c0-4b82-81cf-e99ccd77d857/data_processing_engine/images/data_processing_engine_row_lock.png)