Skip to content

Commit 8ae67a7

Browse files
committed
Remove maybe_wait_for_producer_id test debug statements; PID => producer_id
1 parent 5bab3f2 commit 8ae67a7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kafka/producer/sender.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def run_once(self):
136136
expired_batches = self._accumulator.abort_expired_batches(
137137
self.config['request_timeout_ms'], self._metadata)
138138

139-
# Reset the PID if an expired batch has previously been sent to the broker.
139+
# Reset the producer_id if an expired batch has previously been sent to the broker.
140140
# See the documentation of `TransactionState.reset_producer_id` to understand why
141141
# we need to reset the producer id here.
142142
if self._transaction_state and any([batch.in_retry() for batch in expired_batches]):
@@ -201,9 +201,7 @@ def add_topic(self, topic):
201201
self.wakeup()
202202

203203
def _maybe_wait_for_producer_id(self):
204-
log.debug("_maybe_wait_for_producer_id")
205204
if not self._transaction_state:
206-
log.debug("_maybe_wait_for_producer_id: no transaction_state...")
207205
return
208206

209207
while not self._transaction_state.has_pid():
@@ -236,7 +234,6 @@ def _maybe_wait_for_producer_id(self):
236234
except Errors.RequestTimedOutError:
237235
log.debug("InitProducerId request to node %s timed out", node_id)
238236
time.sleep(self.config['retry_backoff_ms'] / 1000)
239-
log.debug("_maybe_wait_for_producer_id: ok: %s", self._transaction_state.producer_id_and_epoch)
240237

241238
def _failed_produce(self, batches, node_id, error):
242239
log.error("Error sending produce request to node %d: %s", node_id, error) # trace

0 commit comments

Comments
 (0)