-
Notifications
You must be signed in to change notification settings - Fork 57
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
chore: simplify migration scripts and remove store legacy code #2894
chore: simplify migration scripts and remove store legacy code #2894
Conversation
You can find the image built from this PR at
Built from 27441e6 |
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.
1000% Simpler but is it no longer a requirement to be backward compatible?
As for the migration, old messages timestamp
would be all different after the migration would that not affect Status?
I think we are aiming for not backward compatible changes and the same happens in the Status changes. @richard-ramos - correct me if I'm wrong |
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.
Ooh super happy to finally remove legacy store! We should also make sure tu remove it from the API documentation in https://github.com/waku-org/waku-rest-api
Regarding the migration script, there's something I don't quite understand.
Why are we dropping timestamp
and renaming storedAt
to timestamp
instead of just dropping storedAt
? are the current values in timestamp
wrong?
Thanks for the reminder!
Both |
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! Thanks so much! 😍
Even tho status-go will then use v3 once PR status-im/status-go#5123 is merged, existing users that have not updated their status-app will continue to use storeV2 (since that's what their app's status-go version will use), so I'm not sure we should remove the legacy code yet, but keep it instead for a couple of months. |
Thanks for the comment @richard-ramos ! |
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, yeah would have been to easy step to remove store v2 for now. But will come!
The id column is needed because it contains the message digest which is used in store v2, and we need to keep support to store v2 for a while
We want the nwaku node to simultaneously support store-v2 requests and store-v3 requests. Only legacy archive is in charge to archiving messages, and the archived information is suitable to fulfill both store-v2 and store-v3 needs.
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 |
Thanks again for the comments @SionoiS ! In the current changes we are simultaneously supporting store-v2 and store-v3 ( cc @NagyZoltanPeter @gabrielmer ) |
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.
Amazingg PR! Really ingenious workaround to support simultaneously both store versions and keep the code nice and clean :)
Added just a small question and a super nitpick comment
waku/factory/node_factory.nim
Outdated
let rateLimitSetting: RateLimitSetting = | ||
(conf.requestRateLimit, chronos.seconds(conf.requestRatePeriod)) | ||
|
||
try: | ||
await mountLegacyStore(node, rateLimitSetting) |
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.
Here we are calling mountLegacyStore(node, rateLimitSetting)
even in the cases of conf.legacyStore
being false. Is this expected?
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 for that! It is corrected in 5b9871b
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
16b692c
into
chore--archive-drivers-refactor
* posgres legacy: stop using the storedAt field * migration script 6: we still need the id column The id column is needed because it contains the message digest which is used in store v2, and we need to keep support to store v2 for a while * legacy archive: set target migration version to 6 * waku_node: try to use wakuLegacyArchive if wakuArchive is nil * node_factory, waku_node: mount legacy and future store simultaneously We want the nwaku node to simultaneously support store-v2 requests and store-v3 requests. Only the legacy archive is in charge of archiving messages, and the archived information is suitable to fulfill both store-v2 and store-v3 needs. * postgres_driver: adding temporary code until store-v2 is removed --------- Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
Description
timestamp
data within thestoredAt
column.