diff --git a/ccmlib/scylla_node.py b/ccmlib/scylla_node.py index b42b17d2..c23305f6 100644 --- a/ccmlib/scylla_node.py +++ b/ccmlib/scylla_node.py @@ -1299,25 +1299,8 @@ def _write_agent_address_yaml(self, agent_dir): def _write_agent_log4j_properties(self, agent_dir): raise NotImplementedError('ScyllaNode._write_agent_log4j_properties') - def _wait_no_pending_flushes(self, wait_timeout=60, verbose=True): - pending_flushes_re = re.compile(r"^\s*Pending flushes:\s*(?P\d+)\s*$", flags=re.MULTILINE) - - def no_pending_flushes() -> bool: - stdout = self.nodetool('cfstats', timeout=wait_timeout, verbose=verbose)[0] - pending_flushes = False - for match in pending_flushes_re.finditer(stdout): - if int(match.group("count")): - pending_flushes = True - break - return not pending_flushes - - if not wait_for(no_pending_flushes, timeout=wait_timeout, step=1.0): - raise NodeError("Node %s still has pending flushes after " - "%s seconds" % (self.name, wait_timeout)) - def flush(self, ks=None, table=None, **kwargs): super(ScyllaNode, self).flush(ks, table, **kwargs) - self._wait_no_pending_flushes(verbose=kwargs.get('verbose', True)) def _run_scylla_executable_with_option(self, option, scylla_exec_path=None): if not scylla_exec_path: