File: 0002-disable_transaction_logic.patch

package info (click to toggle)
postgrey 1.37-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 528 kB
  • sloc: perl: 1,339; sh: 221; makefile: 17
file content (39 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: Antonio Radici <antonio@debian.org>
Date: Mon, 15 Aug 2016 21:28:23 +0100
Subject: disable-transaction-logic

patch to disable the transactional logic during the cleaning of the DB, this
fixes a problem seen as result of updates of BerkeleyDB.
See http://bugs.debian.org/614968 for more info
---
 postgrey | 8 --------
 1 file changed, 8 deletions(-)

Index: postgrey/postgrey
===================================================================
--- postgrey.orig/postgrey
+++ postgrey/postgrey
@@ -262,11 +262,7 @@ sub do_maintenance($$)
                 $nr_keys_after++;
             }
         }
-        my $db_obj = $self->{postgrey}{db_obj};
-        my $txn = $db_env->txn_begin();
-        $db_obj->Txn($txn);
         for my $key (@old_keys) { delete $db->{$key}; }
-        $txn->txn_commit();
         
         $self->mylog(1, "cleaning main database finished. before: $nr_keys_before, after: $nr_keys_after");
 
@@ -286,11 +282,7 @@ sub do_maintenance($$)
                     $nr_keys_after++;
                 }
             }
-            my $db_cawl_obj = $self->{postgrey}{db_cawl_obj};
-            $txn = $db_env->txn_begin();
-            $db_cawl_obj->Txn($txn);
             for my $key (@old_keys_cawl) { delete $cawl_db->{$key}; }
-            $txn->txn_commit();
 
             $self->mylog(1, "cleaning clients database finished. before: $nr_keys_before, after: $nr_keys_after");
         }