#2854 Kojira can generate SequenceErrors
Closed: Fixed 2 years ago by tkopecek. Opened 2 years ago by mikem.

For example

Traceback (most recent call last):
  File "/usr/sbin/kojira", line 1063, in main
    repomgr.updateRepos()
  File "/usr/sbin/kojira", line 753, in updateRepos
    self.readCurrentRepos()
  File "/usr/sbin/kojira", line 422, in readCurrentRepos
    if not getTag(self.session, repo.tag_id) and not repo.expired():
  File "/usr/sbin/kojira", line 54, in getTag
    info = session.getTag(tag, event=event)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2360, in __call__
    return self.__func(self.__name, args, opts)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2790, in _callMethod
    raise err
koji.SequenceError: 912005 > 912003 (session 11754010)

This is what I believe is happening:

The ManagedRepo class is given a session object in init. These objects are created in the main thread, but can be accessed in the others. In particular, the deleteRepos() function does this, runs in another thread, and makes hub calls that involve commits (and thus record a higher sequence id in the db).

In the ManagedRepo init, it does: self.session = manager.session. The manager session is a special threadlocal propertry, but we're storing just the single value at init time. Likely we just need to make ManagedRepo.session a property that looks up manager.session, therefore getting the correct session for the thread.

Metadata Update from @mikem:
- Custom field Size adjusted to None

2 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.25

2 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

2 years ago

Metadata Update from @tkopecek:
- Issue untagged with: testing-ready
- Issue tagged with: no_qe

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2859 Closed 2 years ago
  • #2855 Merged 2 years ago