From 7d3917a9722e445ecb040c2c01e9665123ad5b6c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Jan 2021 22:28:23 -1000 Subject: lei: deep clone {ovv} for l2m workers We don't need to send the temporary xsearch {git} object over to workers, just the directory name. --- lib/PublicInbox/LEI.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LEI.pm') diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 4f7ed171..08554932 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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 -- cgit v1.2.3-24-ge0c7