]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
searchidx: release lock again during v1 batch callback
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 6e44887d2651c2b20fef84e8a7d38369badf607e..8c3bc2d3ce20ce48267b53381b9dd66b63387ad3 100644 (file)
@@ -22,7 +22,7 @@ require PublicInbox::Git;
 use Compress::Zlib qw(compress);
 
 use constant {
-       BATCH_BYTES => 10_000_000,
+       BATCH_BYTES => 1_000_000,
        DEBUG => !!$ENV{DEBUG},
 };
 
@@ -698,6 +698,7 @@ sub _index_sync {
                        }
                }
                $self->commit_txn_lazy;
+               $xdb = _xdb_release($self);
                # let another process do some work... <
                if (!$newest) {
                        $xdb = $self->begin_txn_lazy;