]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: deep clone {ovv} for l2m workers
authorEric Wong <e@80x24.org>
Mon, 1 Feb 2021 08:28:23 +0000 (22:28 -1000)
committerEric Wong <e@80x24.org>
Mon, 1 Feb 2021 11:38:16 +0000 (11:38 +0000)
We don't need to send the temporary xsearch {git} object over to
workers, just the directory name.

lib/PublicInbox/LEI.pm

index 4f7ed17109ae3f72b21b49f5a97ccb1c730c2ddf..08554932ab8b06957c81380feb9aee1ad6c18192 100644 (file)
@@ -401,8 +401,9 @@ sub atfork_parent_wq {
        my ($self, $wq) = @_;
        my $env = delete $self->{env}; # env is inherited at fork
        my $lei = bless { %$self }, ref($self);
-       if (my $dedupe = delete $lei->{dedupe}) {
-               $lei->{dedupe} = $wq->deep_clone($dedupe);
+       for my $f (qw(dedupe ovv)) {
+               my $tmp = delete($lei->{$f}) or next;
+               $lei->{$f} = $wq->deep_clone($tmp);
        }
        $self->{env} = $env;
        delete @$lei{qw(3 -lei_store cfg old_1 pgr lxs)}; # keep l2m