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

Add protocol compliant PostgresKvStore impl. #35

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

G8XSU
Copy link
Collaborator

@G8XSU G8XSU commented Sep 30, 2024

  • Add protocol compliant PostgresKvStore impl.

@G8XSU G8XSU force-pushed the rust-postgres branch 4 times, most recently from a0196f6 to 2e82585 Compare February 3, 2025 20:04
@G8XSU G8XSU marked this pull request as ready for review February 3, 2025 20:13
@G8XSU G8XSU requested a review from jkczyz February 3, 2025 20:13
Comment on lines +218 to +231
} else if request.key == GLOBAL_VERSION_KEY {
KeyValue { key: GLOBAL_VERSION_KEY.to_string(), value: Bytes::new(), version: 0 }
Copy link

Choose a reason for hiding this comment

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

Shouldn't we read this if it is written in put? The version in the database might not be 0, IIUC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If it is present, we first try to read it(this is the first if condition). If it is not present, then we default to 0 for global version.(this is handled by second if condition i.e. request.key == GLOBLAL_VERSION_KEY)

@G8XSU
Copy link
Collaborator Author

G8XSU commented Feb 5, 2025

Added fixup commit with all fixups.

@G8XSU G8XSU requested a review from jkczyz February 5, 2025 17:40
Copy link

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Just two minor comments, otherwise LGTM after squash.

@G8XSU
Copy link
Collaborator Author

G8XSU commented Feb 10, 2025

Squashed fixups!

@G8XSU G8XSU requested a review from jkczyz February 10, 2025 18:04
@G8XSU G8XSU merged commit 59e0d58 into lightningdevkit:main Feb 11, 2025
1 check passed
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.

2 participants