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

leader, db: Prevent client from attaching more DBs #440

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

cole-miller
Copy link
Contributor

Closes #419

Signed-off-by: Cole Miller cole.miller@canonical.com

We're not set up to handle one connection touching multiple databases
yet.

Signed-off-by: Cole Miller <cole.miller@canonical.com>
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #440 (19cf195) into master (320ea15) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   74.24%   74.21%   -0.03%     
==========================================
  Files          32       32              
  Lines        5378     5380       +2     
  Branches     1680     1682       +2     
==========================================
  Hits         3993     3993              
  Misses        823      823              
- Partials      562      564       +2     
Impacted Files Coverage Δ
src/db.c 53.16% <100.00%> (+0.60%) ⬆️
src/leader.c 70.07% <100.00%> (+0.11%) ⬆️
src/transport.c 69.28% <0.00%> (-1.31%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cole-miller
Copy link
Contributor Author

I think adding this explicit restriction is the way to go for now -- it's pretty clear that our code is not set up to handle multiple databases on one connection, and we should fail early rather than letting things get far enough to cause database corruption.

@MathieuBordere
Copy link
Contributor

I think adding this explicit restriction is the way to go for now -- it's pretty clear that our code is not set up to handle multiple databases on one connection, and we should fail early rather than letting things get far enough to cause database corruption.

I agree, I'll let it open for a bit in order for other people to chime in.

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.

A better error message attempting to use ATTACH DATABASE
2 participants