You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
The number of threads increases with each transaction in some cases (hard to replicate exactly). This is an example thread's stack trace, all of the unexpected and additional threads have the same trace:
["\n# ThreadID: 139762757248768","File: \"/usr/lib/python3.8/threading.py\", line 890, in _bootstrap"," self._bootstrap_inner()","File: \"/usr/lib/python3.8/threading.py\", line 932, in _bootstrap_inner"," self.run()","File: \"/usr/lib/python3.8/threading.py\", line 870, in run"," self._target(*self._args, **self._kwargs)","File: \"/home/ubuntu/adam-action-graph-service/action_selection/venv/lib/python3.8/site-packages/typedb/stream/request_transmitter.py\", line 108, in run"," self._permission_to_run.acquire()","File: \"/usr/lib/python3.8/threading.py\", line 433, in acquire"," self._cond.wait(timeout)","File: \"/usr/lib/python3.8/threading.py\", line 302, in wait"," waiter.acquire()"]
Environment
Ubuntu
TypeDB 2.5.0
TypeDB client-python 2.5.0
Python version 3.8
Reproducible Steps
Unclear at the moment.
Expected Output
"Request transmitter" threads to be closed at the end of a transaction.
Actual Output
The number of threads grows with each transaction, even once closed.
The text was updated successfully, but these errors were encountered:
## What is the goal of this PR?
Instead of launching a background thread in each session to send pulses, we now use a single thread in the Client to send pulses for all of its sessions. This allows the client to handle a much larger number of sessions than it previously could.
## What are the changes implemented in this PR?
**Changeset**
- Move session pulse transmitter to the Client - fixes an issue where spawning a session always spawned a new thread, and it would stick around for at least 5 seconds
- Fixed a bug where closing many sessions concurrently could throw a concurrent modification error
**Fixes**
- fixes#222
- may reduce the chance of seeing #243
Description
The number of threads increases with each transaction in some cases (hard to replicate exactly). This is an example thread's stack trace, all of the unexpected and additional threads have the same trace:
["\n# ThreadID: 139762757248768","File: \"/usr/lib/python3.8/threading.py\", line 890, in _bootstrap"," self._bootstrap_inner()","File: \"/usr/lib/python3.8/threading.py\", line 932, in _bootstrap_inner"," self.run()","File: \"/usr/lib/python3.8/threading.py\", line 870, in run"," self._target(*self._args, **self._kwargs)","File: \"/home/ubuntu/adam-action-graph-service/action_selection/venv/lib/python3.8/site-packages/typedb/stream/request_transmitter.py\", line 108, in run"," self._permission_to_run.acquire()","File: \"/usr/lib/python3.8/threading.py\", line 433, in acquire"," self._cond.wait(timeout)","File: \"/usr/lib/python3.8/threading.py\", line 302, in wait"," waiter.acquire()"]
Environment
Reproducible Steps
Unclear at the moment.
Expected Output
"Request transmitter" threads to be closed at the end of a transaction.
Actual Output
The number of threads grows with each transaction, even once closed.
The text was updated successfully, but these errors were encountered: