]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Fix compute_next_snapshot_time().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 14 Nov 2017 02:19:58 +0000 (03:19 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 19 Nov 2017 01:53:33 +0000 (02:53 +0100)
The function computes the average idle time between snapshots and adds
this value to the completion time of the last snapshot to obtain the
start time for the next snapshot.

However, if the last snapshot happens to be incomplete, its completion
time is set to -1. Hence the computed next snapshot time is going to
be in the past, so we start the next snapshot immediately.

Although this is incorrect, the bug is benign because the correct next
snapshot time should also be in the past since we decided earlier to
create the snapshot which was now found incomplete.

Fix this by using the completion time of the last _complete_ snapshot
instead.


No differences found