Skip to content

Method transact_recover

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: transact_recover()

Turkce Dokumantasyon | English Documentation

Category: Transaction & Concurrency Methods
Submodule: AmberDB::Transact
Entry Type: Crash Recovery


1. Definition and Overview

transact_recover() scans dbstore/txn/ for orphaned .txn undo journal files left behind by ungracefully terminated or crashed worker processes. It rolls back their uncommitted changes deterministically to restore database integrity and removes the orphaned journals. This method is called automatically during AmberDB->new().


2. Syntax and Signature

my $recovered_count = $adb->transact_recover();

3. Practical Code Example

# Explicitly trigger crash recovery
my $recovered = $adb->transact_recover();
print "Recovered $recovered orphaned transaction journals.\n";

4. See Also

AmberDB Encyclopedia

Home · A-Z Index


Getting Started & Guides


Core Concepts


Core CRUD Methods


Query, Search & Facets


Transactions & Locks


Cache, Buffer & Low-Level


Locale & Helpers


Maintenance & Tools


Configuration Flags


File Formats


Language

Clone this wiki locally