| Previous | Next |
| STATEREPOSITORY_E_LOCKED_RETRY | STATEREPOSITORY_E_TRANSACTION_REQUIRED |
STATEREPOSITORY_E_LOCKED_SHAREDCACHE_RETRY
Within Windows StateRepository, STATEREPOSITORY_E_LOCKED_SHAREDCACHE_RETRY reports that a shared-cache lock held by another connection blocked this request. Diagnosis of this result should follow the original owner and generation rather than treating the visible symptom as the cause.
Facts that change the diagnosis
- Shared-cache group and connections.
- Table and schema locks.
- Active prepared statements.
- Thread and transaction ownership.
Subsystem meaning
Connections participating in a shared cache coordinate schema and table locks inside one process or cache group. The key evidence is cache-group membership and connection state, not only the database filename.
Isolation workflow
- First: Avoid sharing one cache group without a clear concurrency design.
- Next: Finish statements before cross-connection writes.
- Then: Test with private caches as a control.
- Finally: Keep retries outside the lock-owning callback.
Avoid the tempting broad fix
LOCKED_RETRY may be table locking generally; LOCKED_SHAREDCACHE_RETRY identifies shared-cache coordination.
Do not assume process-local locks will appear as external file handles.
Expected branches
| Control | Interpretation | Hold constant |
|---|---|---|
| Same database copy, isolated connections | A change points to connection/statement/transaction ownership rather than stored content. | Use a copy and preserve schema plus repository generation. |
| Same operation, controlled environment | If the result follows one machine, account, volume, network, or device, environment matters. | Keep versions and identity explicit rather than comparing only the final message. |
Regression proof
Verify it with the original scenario, one boundary case, and one deliberate failure; success means the cache configuration supports the tested concurrency or is replaced with isolated connections that pass the same workload.
Technical references
Looking for a different code? Search another status or error code.