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
I'm trying to import the information contained in a Git repository to a database. In order to speed up the database population process I run GitPython in a parallel way. Basically I have defined two thread pools (one for branches and tags and the other one for commits). However, it can happen that the process raise this error:
File "C:\Python27\lib\site-packages\smmap\mman.py", line 130, in use_region self._region.increment_client_count() File "C:\Python27\lib\site-packages\smmap\util.py", line 234, in increment_client_count assert self._uc > -1, "Increments must match decrements, usage counter negative: %i" % self._uc AssertionError: Increments must match decrements, usage counter negative
Do you know what is this error message about? Could you give some pointers?
thanks in advance
The text was updated successfully, but these errors were encountered:
The first thing that comes to my mind is that GitPython is not thread-save at all. Therefore you must not share anything related to and including the Repo object, unless all access is behind a mutex. Thus, each thread needs at least its own Repo instance. Once that is done, you might actually be hindered by the GIL, which will only be released if a thread is waiting for IO. Doing Multithreading in Python is usually prevented by it, and MultiProcessing should be used instead.
Hi,
I'm trying to import the information contained in a Git repository to a database. In order to speed up the database population process I run GitPython in a parallel way. Basically I have defined two thread pools (one for branches and tags and the other one for commits). However, it can happen that the process raise this error:
File "C:\Python27\lib\site-packages\smmap\mman.py", line 130, in use_region self._region.increment_client_count() File "C:\Python27\lib\site-packages\smmap\util.py", line 234, in increment_client_count assert self._uc > -1, "Increments must match decrements, usage counter negative: %i" % self._uc AssertionError: Increments must match decrements, usage counter negative
Do you know what is this error message about? Could you give some pointers?
thanks in advance
The text was updated successfully, but these errors were encountered: