File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -538,9 +538,13 @@ def _send_list_offsets_requests(self, timestamps):
538
538
for partition , timestamp in six .iteritems (timestamps ):
539
539
node_id = self ._client .cluster .leader_for_partition (partition )
540
540
if node_id is None :
541
+ if partition .topic not in self ._client .cluster .topics ():
542
+ log .warning ("Could not lookup offsets for partition %s since no metadata is available for topic. "
543
+ "Wait for metadata refresh and try again" , partition )
544
+ else :
545
+ log .warning ("Could not lookup offsets for partition %s since no metadata is available for it. "
546
+ "Wait for metadata refresh and try again" , partition )
541
547
self ._client .add_topic (partition .topic )
542
- log .debug ("Partition %s is unknown for fetching offset,"
543
- " wait for metadata refresh" , partition )
544
548
return Future ().failure (Errors .StaleMetadata (partition ))
545
549
elif node_id == - 1 :
546
550
log .debug ("Leader for partition %s unavailable for fetching "
You can’t perform that action at this time.
0 commit comments