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

feat: add last online timestamp to archive and drivers #2916

Closed
wants to merge 3 commits into from

Conversation

SionoiS
Copy link
Contributor

@SionoiS SionoiS commented Jul 17, 2024

Description

This PR adds a way to save a timestamp periodically so that we can know when the node was last online.

This feature will be used for a future store resume functionality.

Changes

  • sqlite driver set/get last online timestamp
  • postgres driver set/get last online timestamp
  • postgres migration
  • archive set/get last online timestamp
  • archive periodically set last online timestamp
  • drivers test

Copy link

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 release-notes is added to make sure upgrade instructions properly highlight this change.

Copy link

github-actions bot commented Jul 17, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2916

Built from 1c470e7

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we really need a migration just to add a new table?

@Ivansete-status
Copy link
Collaborator

Thanks for that @SionoiS ! Nevertheless, I'm curious about the underlying deliverable/milestone :)

@SionoiS
Copy link
Contributor Author

SionoiS commented Jul 17, 2024

Thanks for that @SionoiS ! Nevertheless, I'm curious about the underlying deliverable/milestone :)

It's part of Store sync waku-org/pm#131 a protocol/heuristic to resume store services after an offline period

@Ivansete-status
Copy link
Collaborator

It's part of Store sync waku-org/pm#131 a protocol/heuristic to resume store services after an offline period

Cool thanks! In that case, I think is better to have a separate sqlite database where we store that info. Similar to the peers.db where we store peers data. The reason is that in Status we have two nwaku nodes that share the same PostgreSQL database.

@SionoiS SionoiS marked this pull request as draft July 18, 2024 11:42
@SionoiS SionoiS closed this Jul 18, 2024
@SionoiS SionoiS deleted the feat--archive-last-online branch July 18, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants