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

Sqlite and MySql support for asynk #141

Merged
merged 91 commits into from
Apr 19, 2024
Merged

Sqlite and MySql support for asynk #141

merged 91 commits into from
Apr 19, 2024

Conversation

pxp9
Copy link
Collaborator

@pxp9 pxp9 commented Aug 26, 2023

  • PostgreSQL reimplementation in sqlx
  • SQLite implementation in sqlx
  • MySQL implementation in sqlx
  • Organize the features
  • Delete tokio_postgres and bb8 deps from crate.
  • Add new testing DBs setups to workflow (Added only for Sqlite and Postgresql).
  • Add new testing for MySQL
  • Add testing for blocking and fang_derive_error

…s and also probably need to make queries folder for `sqlite` and `mysql`
@pxp9 pxp9 marked this pull request as draft August 26, 2023 20:41
@pxp9 pxp9 requested review from Dopplerian and ayrat555 August 26, 2023 20:41
@pxp9
Copy link
Collaborator Author

pxp9 commented Aug 28, 2023

There is one bug in sqlite implementation or test.

For some reason

asynk::async_queue::sqlite::fetch_and_touch_test fails because it does not fetch nothing because SQLite has locked the entry.

when this FOR UPDATE SKIP LOCKED is deleted it from SQLite fetch_task_type query, works fine.

Copy link
Owner

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

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

looking good. a couple of comment

fang/src/asynk/async_queue.rs Outdated Show resolved Hide resolved
fang/src/asynk/async_runnable.rs Outdated Show resolved Hide resolved
@pxp9 pxp9 requested a review from ayrat555 August 30, 2023 07:05
fang/Cargo.toml Outdated Show resolved Hide resolved
fang/src/asynk/async_queue.rs Outdated Show resolved Hide resolved
Copy link
Owner

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

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

looking really good,

.github/workflows/rust.yml Show resolved Hide resolved
fang/Cargo.toml Outdated Show resolved Hide resolved
fang/src/asynk/backend_sqlx.rs Outdated Show resolved Hide resolved
@pxp9
Copy link
Collaborator Author

pxp9 commented Apr 15, 2024

Sometimes fetch and touch in mysql fetches the task that is created after that one that should fetch

@pxp9
Copy link
Collaborator Author

pxp9 commented Apr 16, 2024

Sometimes fetch and touch in mysql fetches the task that is created after that one that should fetch

this test has 3 different situations:

  • It passes
  • It fails with unwrap because it did not fetch any task
  • it fails with assert because it got the wrong task (should get always the older task first).

@pxp9 pxp9 dismissed 0xCAB0’s stale review April 17, 2024 11:14

changes since this requested changes

@pxp9 pxp9 requested a review from Dopplerian April 17, 2024 11:14
@pxp9 pxp9 dismissed Dopplerian’s stale review April 17, 2024 11:15

changes since last review

Copy link
Owner

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

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

looking good. a couple of comments

fang/README.md Outdated Show resolved Hide resolved
fang/README.md Outdated Show resolved Hide resolved
@pxp9 pxp9 requested a review from ayrat555 April 17, 2024 18:23
Copy link
Owner

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

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

changes should be added to the changelog file

fang/README.md Show resolved Hide resolved
@pxp9 pxp9 requested review from ayrat555 and Dopplerian April 18, 2024 10:04
Copy link
Collaborator

@Dopplerian Dopplerian left a comment

Choose a reason for hiding this comment

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

Seeing a ton of muts be deleted is one of the most satisfying things in this world.

Copy link
Collaborator

@0xCAB0 0xCAB0 left a comment

Choose a reason for hiding this comment

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

LGTM distinguished gentlemen

@pxp9 pxp9 merged commit bcbb48d into master Apr 19, 2024
8 checks passed
@pxp9 pxp9 deleted the support-sqlite-mysql-asynk branch April 19, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thank you Add support for SQLite
5 participants