Merge "sharder: fix 'Cleaving not completed' warning log"
This commit is contained in:
commit
04c27e43a0
@ -1079,10 +1079,10 @@ class ContainerSharder(ContainerSharderConf, ContainerReplicator):
|
||||
# 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
|
||||
# whether sharding has been taking too long or not.
|
||||
self.warning(broker,
|
||||
'Cleaving has not completed in %.2f seconds since %s.'
|
||||
'DB state: %s, own_shard_range state: %s, '
|
||||
'state count of shard ranges: %s' %
|
||||
self.warning(
|
||||
broker, 'Cleaving has not completed in %.2f seconds since %s. '
|
||||
'DB state: %s, own_shard_range state: %s, state count of '
|
||||
'shard ranges: %s' %
|
||||
(time.time() - float(own_shard_range.epoch),
|
||||
own_shard_range.epoch.isoformat, db_state,
|
||||
own_shard_range.state_text, str(state_count)))
|
||||
|
@ -3373,8 +3373,8 @@ class TestSharder(BaseTestSharder):
|
||||
sharder._record_sharding_progress(broker, {}, None)
|
||||
warning_lines = sharder.logger.get_lines_for_level('warning')
|
||||
self.assertIn(
|
||||
'Cleaving has not completed in %.2f seconds since %s.' %
|
||||
(future_time - float(own_shard_range.epoch),
|
||||
'Cleaving has not completed in %.2f seconds since %s. DB state: '
|
||||
'sharding' % (future_time - float(own_shard_range.epoch),
|
||||
own_shard_range.epoch.isoformat),
|
||||
warning_lines[0])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user