gc.sh: trigger mini gc in forks if needed on copy down
commit1ecedd8615c6353796711fe9ca246f350b4238df
authorKyle J. McKay <mackyle@gmail.com>
Sun, 21 Aug 2016 02:30:21 +0000 (20 19:30 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 21 Aug 2016 02:30:21 +0000 (20 19:30 -0700)
tree8d3a512431685ddb492da092b574b3e3a281ae9e
parent134bfe240bd6f632807096455a5356c3b4760813
gc.sh: trigger mini gc in forks if needed on copy down

When the packs from a parent are copied (actually hard linked) down into
any forks before beginning gc on the parent, this could bump the number
of packs in a fork above the threshold for a mini gc.

Detect this and set .needsgc in this case.

Although this is unlikely in practice since the parent does attempt to
combine small packs in this case before copying (linking) the packs down
to any forks, it could still happen if the parent has many large packs
or the fork was on the verge of triggering already so it's good to do
the check since it's very cheap.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
jobd/gc.sh