#1603 Possible double update in CG_Importer.get_build()
Closed: Fixed by mikem. Opened by mikem.

In CG_Importer.get_build(), with recent changes for 1.18, the code can both create and update the same row in a single transaction. This sort of double update is something I've learned to avoid in Postgres because it can break some deadlock protections. Also, it's kind of messy.

This isn't necessarily a bug. I have no example yet of this leading to bad behavior, but it is still worrisome.


Leaning towards dropping this from 1.18

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

Metadata Update from @mikem:
- Issue set to the milestone: 1.19 (was: 1.18)

Metadata Update from @mikem:
- Issue tagged with: bug

Apart from any worry about deadlocks, this behavior is also resulting in duplicate messages.

  • At the beginning of CG_Importer.get_build(), the new_build() call issues a postBuildStateChange callback showing the state going from None to COMPLETE
  • In the latter part, the "update build state" stanza issues a redundant postBuildStateChange callback, showing the state has changed from COMPLETE to COMPLETE.

Metadata Update from @tkopecek:
- Issue untagged with: discussion

Commit 916e70c1 fixes this issue

Commit a5f2d582 fixes this issue

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

Metadata Update from @dgregor:
- Issue assigned to mikem

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/1603

Please continue any further discussion there.

Metadata
Related Pull Requests