… | |
… | |
77 | add_tag_target $txn, $tag, $key; |
77 | add_tag_target $txn, $tag, $key; |
78 | } |
78 | } |
79 | |
79 | |
80 | # we don't actually care if it succeeds or not, as we |
80 | # we don't actually care if it succeeds or not, as we |
81 | # will just retry an hour later |
81 | # will just retry an hour later |
82 | BDB::db_txn_commit $txn; |
82 | BDB::db_txn_finish $txn; |
83 | |
83 | |
84 | # warn "tag-updated $file (= $key) $hash\n";#d# |
84 | # warn "tag-updated $file (= $key) $hash\n";#d# |
85 | } |
85 | } |
86 | |
86 | |
87 | sub scan_static { |
87 | sub scan_static { |
… | |
… | |
126 | my $txn = $cf::DB_ENV->txn_begin; |
126 | my $txn = $cf::DB_ENV->txn_begin; |
127 | BDB::db_del $db_mapinfo, $txn, $key; |
127 | BDB::db_del $db_mapinfo, $txn, $key; |
128 | for my $tag (@{ $tags || [] }) { |
128 | for my $tag (@{ $tags || [] }) { |
129 | remove_tag_target $txn, $tag, $key; |
129 | remove_tag_target $txn, $tag, $key; |
130 | } |
130 | } |
131 | BDB::db_txn_commit $txn; |
131 | BDB::db_txn_finish $txn; |
132 | } |
132 | } |
133 | } |
133 | } |
134 | |
134 | |
135 | # 2. scan all static maps |
135 | # 2. scan all static maps |
136 | scan_static $cf::MAPDIR, "/"; |
136 | scan_static $cf::MAPDIR, "/"; |