OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

Unused transactions opened for long-running operations #6803

Open MarkSiedle opened 3 years ago

MarkSiedle commented 3 years ago

The bug

When our generic document store (internal link) was first introduced in 2021.1.6060, we had a bug where, if we accessed the document stores via a transaction (the service locators), we would end up with an additional transaction getting new'd up from the constructor dependency of the document store.

This meant we ended up with an unused transaction that came along from the ride and hung around for the lifetime of the document store, not the lifetime of the transaction where we were accessing the document store. If you ran up a deployment/runbook, you would notice open/unused "user" transactions using this query:

select * from sys.dm_tran_active_transactions

What I expected to happen

We're actively eliminating the service locator pattern now, but in the meantime, we are making the constructor dependency of the document store Lazy so if we access this via the service locators on the transaction, it won't get requested from the container.

Affected versions

Octopus Server: 2021.1+

Links

Clare-Octopus commented 2 years ago

Three tickets in for this (customers are experiencing this after upgrading to a version higher than 2021.3.8275).

https://octopus.zendesk.com/agent/tickets/83749 https://octopus.zendesk.com/agent/tickets/83079 https://help.octopus.com/t/error-while-executing-sql-command-after-update-to-2021-3-12205/27637

The last one they are seeing the issue in their logs but we don't think it is related to them not being able to open Library > Packages.

KennethBates commented 2 years ago

Another report: https://octopus.zendesk.com/agent/tickets/83804 (private)

paraicoceallaigh commented 2 years ago

another report: https://octopus.zendesk.com/agent/tickets/86932 (private)