Skip to content

"Handle is terminating" exception when calling delete_topics #1298

Open
@mhowlett

Description

@mhowlett

It has been reported that:

AdminClient({...}).delete_topics(
    topics=topics, operation_timeout=30.0
)

gives the exception:

cimpl.KafkaException: KafkaError{code=_DESTROY,val=-197,str="Handle is terminating: Success"}

whereas:

client: AdminClient = AdminClient({...})

client.delete_topics(
    topics=topics, operation_timeout=30.0
)

does not.

stack trace:

 File "<redacted>/topics.py", line 26, in delete_topics
    future.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/airflow/.local/lib/python3.7/site-packages/confluent_kafka/admin/__init__.py", line 235, in _make_topics_result
    result = f.result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
    return self.__get_result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=_DESTROY,val=-197,str="Handle is terminating: Success"}

Seems like it might be a bug related to reference counting of the AdminClient instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequesting a feature changepriority:lowMaintainer triage tag for indicating low impact or criticality issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions