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

Register lock when fetch_all_schemas face idle #996

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

devgony
Copy link
Collaborator

@devgony devgony commented Nov 9, 2022

Goal

Let user be able to use fetch_all_schemas even if the transaction state is idle

Todo

  • replace conflict to register lock

@devgony devgony added the improvement Improvements for existing features label Nov 9, 2022
@devgony devgony self-assigned this Nov 9, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3427933986

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 34 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 98.509%

Changes Missing Coverage Covered Lines Changed/Added Lines %
storages/sled-storage/src/store.rs 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
core/src/executor/aggregate/mod.rs 34 81.82%
Totals Coverage Status
Change from base Build 3421293325: 0.01%
Covered Lines: 38267
Relevant Lines: 38846

💛 - Coveralls

"conflict - fetch_all_schemas failed, lock does not exist".to_owned(),
));
}
State::Idle => lock::register(&self.tree, self.id_offset)?,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can we.. test this kinda code?

Copy link
Member

Choose a reason for hiding this comment

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

I think this is good for now.
And it would be good for simplifying the codes in cli/lib.rs by following PR :)
ref.

let (storage, _) = storage.begin(true).await.map_err(|(_, error)| error)?;

Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

Looks nice 👍 Thanks @devgony

@panarch panarch merged commit 6b4583f into gluesql:main Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants