# Causes and solutions for DATA\_LOSS errors

**URL:** <https://community.temporal.io/t/causes-and-solutions-for-data-loss-errors/17913>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [July 11, 2025, 11:05pm UTC](https://community.temporal.io/t/causes-and-solutions-for-data-loss-errors/17913 "2025-07-11T23:05:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Ken](https://community.temporal.io/u/Ken)\
**Post date:** [July 11, 2025, 11:05pm UTC](https://community.temporal.io/t/causes-and-solutions-for-data-loss-errors/17913/1 "2025-07-11T23:05:42Z")

</div>

Version: v1.13.0

After rolling back the database in the production environment, the following two types of errors began to occur frequently on the client side.

1. `io.grpc.StatusRuntimeException: DATA_LOSS: Incomplete history: expected events [1-4] but got events [1-3] of length 3: isFirstPage=true,isLastPage=true,pageSize=256 at io.grpc.stub.ClientCalls.toStatusRuntimeException`

2. `io.grpc.StatusRuntimeException: DATA_LOSS: corrupted history event batch, eventID is not contiguous at io.grpc.stub.ClientCalls.toStatusRuntimeException`

Why is these error occurring, and what steps should be taken to resolve it?

I attempted to reproduce the issue in the development environment but were unable to do so.

At the same time, the CPU usage of the database has increased, causing further issues.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [July 12, 2025, 7:45am UTC](https://community.temporal.io/t/causes-and-solutions-for-data-loss-errors/17913/2 "2025-07-12T07:45:42Z")

</div>

Temporal relies on DB being fully consistent. It looks like db rollback left the DB in an inconsistent state. At this point the best option is to recreate DB. If this is not possible you can try deleting specific workflows that broke.
