File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -412,10 +412,23 @@ def _send_request_to_controller(self, request):
412
412
tries = 2 # in case our cached self._controller_id is outdated
413
413
while tries :
414
414
tries -= 1
415
- future = self ._send_request_to_node (self ._controller_id , request )
415
+ future = self ._client . send (self ._controller_id , request )
416
416
417
417
self ._wait_for_futures ([future ])
418
418
419
+ if future .exception is not None :
420
+ log .error (
421
+ "Sending request to controller_id %s failed with %s" ,
422
+ self ._controller_id ,
423
+ future .exception ,
424
+ )
425
+ is_outdated_controler = (
426
+ self ._client .cluster .broker_metadata (self ._controller_id ) is None
427
+ )
428
+ if is_outdated_controler :
429
+ self ._refresh_controller_id ()
430
+ continue
431
+
419
432
response = future .value
420
433
# In Java, the error field name is inconsistent:
421
434
# - CreateTopicsResponse / CreatePartitionsResponse uses topic_errors
You can’t perform that action at this time.
0 commit comments