Skip to content

2024.2.3.0-b114

@ttyusupov ttyusupov tagged this 07 May 08:34
Summary:
As a part of applying SNAPSHOT_OP (in observed scenario it was delete snapshot operation), yugabyte-db updates flushed frontier in RocksDB manifest file by calling `Tablet::ModifyFlushedFrontier` inside `SnapshotOperation::DoReplicated` function. But at that time although previous write operations have been applied to the RocksDB instance, they might not have been flushed to the SST file yet. And if tserver is crashed at this moment this tablet peer can lose the data.

Fixed this by updating `Tablet::ModifyFlushedFrontier` to first synchronously flush both regular and intents DB and only then update flushed frontier inside manifest file.
Added SnapshotTest.CrashAfterFlushedFrontierSaved unit-test that covers the fixed issue.
Jira: DB-16331

Original commit: 65eb67de50cfaf9a58894e44918831f3dc4ff864 / D43624

Test Plan: SnapshotTest.CrashAfterFlushedFrontierSaved

Reviewers: sergei, arybochkin

Reviewed By: arybochkin

Subscribers: ybase

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D43763
Assets 2
Loading