-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: archive update for store v3 #2451
Conversation
This PR may contain changes to database schema of one of the drivers. If you are introducing any changes to the schema, make sure the upgrade from the latest release to this change passes without any errors/issues. Please make sure the label |
e0dd6db
to
82b0155
Compare
You can find the image built from this PR at
Built from f03ee1c |
d14c849
to
e604fab
Compare
Will have to wait for #2506, resolve and then review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks great! I'm just adding a few points that I think we need to double-check
ba164cb
to
8a1d1bc
Compare
8a1d1bc
to
e0d5cac
Compare
8d51820
to
c3725ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the patience!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work! 🔥 🔥 🔥
Thanks so much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - this was quite a detailed effort. I've added a few comments, but approving since none are blocking. One general comment: there do seem to be quite a few changes unrelated to what is exactly needed for archive queries to support v3. I get the impulse, as there's clearly a lot that can be improved, but may be good to separate into separate PRs as much as possible in future to derisk and make reviewing a bit easier. :)
@@ -257,6 +266,12 @@ proc getMessagesArbitraryQuery(s: PostgresDriver, | |||
for t in contentTopic: | |||
args.add(t) | |||
|
|||
if hexHashes.len > 0: | |||
let cstmt = "messageHash IN (" & "?".repeat(hexHashes.len).join(",") & ")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an index built on this column? Would it be necessary for querying on message hash to be efficient? Perhaps we'll need a benchmark on a rather large DB (future work).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any indexing. It would be good to take a good look at the Db schema once Store v2 is remove. I feel we could get better perfs.
Yes testing will tell us what to expect performance wise. We may have to use LMDB in the end (I hope not).
Yes, some part of the code was not up to our current standards.
Guilty :P I need to get better at this. |
Description
I tried a bunch of things that didn't work. In the end I simply added hashed to requests and responses. This approach will require a good clean-up after store v2 is removed.
I simplified how message are validated since we never exposed the validation even if the intent seamed to be to make it configurable. Do we want fully configurable validation? What kind of messages do we reject exactly?
There are also couple of comments that require reviewers input.
Changes
WakuArchive
Tracking #2425