Skip to content

fix(sqlite): идентификатор вставки читается до рассылки события - #164

Open
sfaqer wants to merge 1 commit into
nixel2007:masterfrom
sfaqer:claude/thread-safety-a4-sqlite-insert-id
Open

sfaqer wants to merge 1 commit into
nixel2007:masterfrom
sfaqer:claude/thread-safety-a4-sqlite-insert-id

Conversation

@sfaqer

@sfaqer sfaqer commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Часть разбиения #154 (4 из 4): SQLite читал last_insert_rowid уже после рассылки события вставки.

Что чинит

Как проявлялось на master Исправление
Наблюдатель после INSERT, который пишет в ту же базу через менеджер, получал то же соединение, и его вставка подменяла идентификатор: сохранённая сущность получала идентификатор журнальной строки Новая АбстрактныйКоннекторSQL.ВставитьСНаблюдением выполняет вставку и читает идентификатор до ЗавершитьЗапрос, то есть до рассылки события

Тесты

КоннекторSQLite.ЗаписьНаблюдателяПослеВставкиНеСдвигаетИдентификатор: наблюдатель НаблюдательСДействием после INSERT сохраняет строку журнала с идентификатором 1000. На master автор получал 1000.

От остальных частей #154 не зависит.

Полный прогон без PostgreSQL: OneScript 2.2.0 — 300 из 300, 2.3.0-next+a02323a1 — 300 из 300.

🤖 Generated with Claude Code

Наблюдатель после INSERT, который пишет в ту же базу через менеджер, получает
то же соединение и своей вставкой сдвигал last_insert_rowid: сохраненная
сущность получала идентификатор чужой строки. Новая
АбстрактныйКоннекторSQL.ВставитьСНаблюдением читает идентификатор до
ЗавершитьЗапрос.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45409a55-c758-40f9-9da5-bbf56d040e44
📥 Commits

Reviewing files that changed from the base of the PR and between 8241fc5 and e9cf517.

📒 Files selected for processing (3)
  • src/Классы/АбстрактныйКоннекторSQL.os
  • src/Классы/КоннекторSQLite.os
  • tests/КоннекторSQLite.os
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant