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

Extend dialogue storages with RocksDB #753

Merged
merged 3 commits into from Oct 30, 2022
Merged

Conversation

xamgore
Copy link
Contributor

@xamgore xamgore commented Oct 22, 2022

The implementation is straightforward and uses a MultiThread database instance. The delete_chat method has an excessive check, that allows raising the DialogueNotFound exception, though I'm not sure why anybody would need this. Should we remove it?

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@xamgore xamgore force-pushed the rocksdb-storage branch 6 times, most recently from 130517b to 4b6c97b Compare October 22, 2022 18:21
@xamgore xamgore requested review from Hirrolot and removed request for WaffleLapkin October 22, 2022 18:22
types::ChatId,
};

#[tokio::test(flavor = "multi_thread")]
Copy link
Member

Choose a reason for hiding this comment

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

Is there a particular reason to use flavor = "multi_thread"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I have just copied tests from tests/sqlite.rs, but can't find any arguments for it. Should I remove it?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, if this already existed then this can be left to a followup PR. I think we could have a function like test_storage() (or a number of functions anyway...) so that we test all storages in the same exact way.

@xamgore
Copy link
Contributor Author

xamgore commented Oct 26, 2022

@WaffleLapkin @Hirrolot I have also changed README.md and doc comments. Do you have any additional requests?

WaffleLapkin
WaffleLapkin previously approved these changes Oct 29, 2022
Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

This looks good to me, however @Hirrolot knows the storages better, so I'd wait for his review.

Copy link
Collaborator

@Hirrolot Hirrolot left a comment

Choose a reason for hiding this comment

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

One final nitpick and this PR is ready to be merged!

CHANGELOG.md Outdated Show resolved Hide resolved
@Hirrolot Hirrolot self-requested a review October 30, 2022 05:57
@Hirrolot
Copy link
Collaborator

Thanks for submitting a useful feature, @xamgore!

@Hirrolot Hirrolot merged commit 926b8ef into teloxide:dev Oct 30, 2022
WaffleLapkin pushed a commit that referenced this pull request Nov 1, 2022
Extend dialogue storages with RocksDB

Former-commit-id: 926b8ef
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.

None yet

3 participants