f59b84ace2
bustWorkspaceCache звался сразу после write, но ВНУТРИ переданной транзакции (до коммита). Окно: параллельный читатель промахивается мимо инвалидированного ключа, читает ещё НЕ закоммиченную (старую) строку и репопулирует кэш старым значением; после коммита кэш держит устаревшее до TTL (15 c). Добавил post-commit-хук в executeTx: registerAfterCommit(trx, fn) регистрирует side-effect, который дренится ТОЛЬКО после коммита транзакции — причём внешним executeTx, владеющим trx (проброшенный existingTrx срабатывает на настоящей границе коммита, а не во вложенном вызове). WeakMap по trx — без утечки. bustWorkspaceCache теперь: без trx — del сразу (уже автокоммит); с trx — регистрирует del на post-commit. Ошибка хука не валит уже закоммиченный write. Тест: порядок body→commit→hook, дренаж на внешней границе, глушение падения хука. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A progressive Node.js framework for building efficient and scalable server-side applications.
Description
Nest framework TypeScript starter repository.
Installation
$ npm install
Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Migrations
# This creates a new empty migration file named 'init'
$ npm run migration:create --name=init
# Generates 'init' migration file from existing entities to update the database schema
$ npm run migration:generate --name=init
# Runs all pending migrations to update the database schema
$ npm run migration:run
# Reverts the last executed migration
$ npm run migration:revert
# Reverts all migrations
$ npm run migration:revert
# Shows the list of executed and pending migrations
$ npm run migration:show
## Test
```bash
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.