sharder: fix 'Cleaving not completed' warning log
Fix missing space between the epoch time and "DB state:" in the log message. Change-Id: Ib654ba58cdcbf245458816460a15c964dfdb073c
This commit is contained in:
parent
6d3d419715
commit
e15d6880e8
@ -1079,10 +1079,10 @@ class ContainerSharder(ContainerSharderConf, ContainerReplicator):
|
|||||||
# container DB, which predicates sharding starting. But s-m-s-r and
|
# container DB, which predicates sharding starting. But s-m-s-r and
|
||||||
# auto-sharding do set epoch and then merge, so we use it to tell
|
# auto-sharding do set epoch and then merge, so we use it to tell
|
||||||
# whether sharding has been taking too long or not.
|
# whether sharding has been taking too long or not.
|
||||||
self.warning(broker,
|
self.warning(
|
||||||
'Cleaving has not completed in %.2f seconds since %s.'
|
broker, 'Cleaving has not completed in %.2f seconds since %s. '
|
||||||
'DB state: %s, own_shard_range state: %s, '
|
'DB state: %s, own_shard_range state: %s, state count of '
|
||||||
'state count of shard ranges: %s' %
|
'shard ranges: %s' %
|
||||||
(time.time() - float(own_shard_range.epoch),
|
(time.time() - float(own_shard_range.epoch),
|
||||||
own_shard_range.epoch.isoformat, db_state,
|
own_shard_range.epoch.isoformat, db_state,
|
||||||
own_shard_range.state_text, str(state_count)))
|
own_shard_range.state_text, str(state_count)))
|
||||||
|
@ -3373,8 +3373,8 @@ class TestSharder(BaseTestSharder):
|
|||||||
sharder._record_sharding_progress(broker, {}, None)
|
sharder._record_sharding_progress(broker, {}, None)
|
||||||
warning_lines = sharder.logger.get_lines_for_level('warning')
|
warning_lines = sharder.logger.get_lines_for_level('warning')
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
'Cleaving has not completed in %.2f seconds since %s.' %
|
'Cleaving has not completed in %.2f seconds since %s. DB state: '
|
||||||
(future_time - float(own_shard_range.epoch),
|
'sharding' % (future_time - float(own_shard_range.epoch),
|
||||||
own_shard_range.epoch.isoformat),
|
own_shard_range.epoch.isoformat),
|
||||||
warning_lines[0])
|
warning_lines[0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user