Skip to content

Commit

Permalink
Merge pull request #144 from aiven/hacka/fix-infinite-loop
Browse files Browse the repository at this point in the history
bugfix: fix infinite loop
  • Loading branch information
Mikko Saarinen authored Jan 20, 2021
2 parents 022063f + 4254119 commit 4d95248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions karapace/kafka_rest_apis/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def cluster_metadata(self, topics: List[str] = None, retries: int = 0) -> dict:
"Kafka Admin interface cannot determine the controller using MetadataRequest_v{}.".format(metadata_version)
)
request = MetadataRequest[1](topics=topics)
future = self._send_request_to_node(self._client.least_loaded_node(), request)
future = self._send_request_to_least_loaded_node(request)
try:
self._wait_for_futures([future])
except Cancelled:
Expand Down Expand Up @@ -94,7 +94,7 @@ def make_offsets_request(self, topic: str, partition_id: int, timestamp: int) ->
else:
request = OffsetRequest[2](-1, 1, list(six.iteritems({topic: [(partition_id, timestamp)]})))

future = self._send_request_to_node(self._client.least_loaded_node(), request)
future = self._send_request_to_least_loaded_node(request)
return future

def get_offsets(self, topic: str, partition_id: int) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
git+https://github.com/aiven/avro.git@skip-namespace-validation#subdirectory=lang/py3/
git+git://github.com/aiven/kafka-python.git@346c01e4eec6bdcccc99ca613b79020f3be35eb7
git+git://github.com/aiven/kafka-python.git@b9f2f78377d56392f61cba8856dc6c02ae841b79
yapf==0.30.0
aiohttp-socks==0.5.5
pylint==2.4.4
Expand Down

0 comments on commit 4d95248

Please sign in to comment.