Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release DB handle on follower when escalating command #1886

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

tylerkaraszewski
Copy link
Contributor

@tylerkaraszewski tylerkaraszewski commented Oct 7, 2024

Details

This just releases the DB handle before escalation, freeing it up for others to use.

Fixed Issues

Fixes https://expensify.slack.com/archives/C07PP7QV8P5/p1728324082742299

Tests


Internal Testing Reminder: when changing bedrock, please compile auth against your new changes

@@ -87,11 +87,18 @@ void SQLitePool::returnToPool(size_t index) {
_wait.notify_one();
}

SQLiteScopedHandle::SQLiteScopedHandle(SQLitePool& pool, size_t index) : _pool(pool), _index(index)
SQLiteScopedHandle::SQLiteScopedHandle(SQLitePool& pool, size_t index) : _pool(pool), _index(index), _released(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this start with false instead? Or do we need somewhere to actually change that to false in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely should.

@tylerkaraszewski
Copy link
Contributor Author

@danieldoglas updated, ready for re-review.

@danieldoglas danieldoglas merged commit 8bf3a4b into main Oct 8, 2024
1 check passed
@danieldoglas danieldoglas deleted the tyler-release-db-on-escalate branch October 8, 2024 15:00
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.

2 participants