Skip to content

Commit f0bb806

Browse files
committed
fix(vdi): fix wait for coalesce condition
The condition would return immediately because of the double negation. The new condition is returning true when the parent has changed but `wait_for_not` would stop at the first iteration since it's expecting a false. Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
1 parent 1a9c4ba commit f0bb806

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/vdi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
_param_set,
99
ensure_type,
1010
strtobool,
11-
wait_for_not,
11+
wait_for,
1212
)
1313

1414
from typing import TYPE_CHECKING, Callable, Literal, Optional, TypeVar, overload
@@ -117,6 +117,6 @@ def wait_for_coalesce(self, fn: Callable[[], R] | None = None) -> R | None:
117117
ret = fn()
118118
# It is necessary to wait a long time because the GC can be paused for more than 5 minutes.
119119
# And it is also necessary to allow a sufficiently long merge time which depends on the amount of data.
120-
wait_for_not(lambda: self.get_parent() != previous_parent, msg="Waiting for coalesce", timeout_secs=10 * 60)
120+
wait_for(lambda: self.get_parent() != previous_parent, msg="Waiting for coalesce", timeout_secs=10 * 60)
121121
logging.info("Coalesce done")
122122
return ret

0 commit comments

Comments
 (0)