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

Protobuf serialization should be done outside of a transaction #1024

Closed
joshua-spacetime opened this issue Mar 26, 2024 · 0 comments · Fixed by #1027
Closed

Protobuf serialization should be done outside of a transaction #1024

joshua-spacetime opened this issue Mar 26, 2024 · 0 comments · Fixed by #1027
Assignees

Comments

@joshua-spacetime
Copy link
Collaborator

Currently we serialize messages while holding a tx handle, which means we're holding the database lock while performing serialization. Instead protobuf serialization should happen after the message has already been placed, i.e ordered, in the send queue.

joshua-spacetime added a commit that referenced this issue Mar 26, 2024
Closes #1024.

Before this change,
we would serialize messages **before** inserting into the send queue.

Because we commit the tx only after inserting into the send queue,
this meant we were holding onto the database lock unnecessarily.

After this change,
we serialize messages **after** inserting into the send queue.
This means we serialize only after committing the tx.
joshua-spacetime added a commit that referenced this issue Mar 26, 2024
Closes #1024.

Before this change,
we would serialize messages **before** inserting into the send queue.

Because we commit the tx only after inserting into the send queue,
this meant we were holding onto the database lock unnecessarily.

After this change,
we serialize messages **after** inserting into the send queue.
This means we serialize only after committing the tx.
joshua-spacetime added a commit that referenced this issue Mar 26, 2024
Closes #1024.

Before this change,
we would serialize messages **before** inserting into the send queue.

Because we commit the tx only after inserting into the send queue,
this meant we were holding onto the database lock unnecessarily.

After this change,
we serialize messages **after** inserting into the send queue.
This means we serialize only after committing the tx.
joshua-spacetime added a commit that referenced this issue Mar 26, 2024
Closes #1024.

Before this change,
we would serialize messages **before** inserting into the send queue.

Because we commit the tx only after inserting into the send queue,
this meant we were holding onto the database lock unnecessarily.

After this change,
we serialize messages **after** inserting into the send queue.
This means we serialize only after committing the tx.
@joshua-spacetime joshua-spacetime self-assigned this Mar 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 27, 2024
Closes #1024.

Before this change,
we would serialize messages **before** inserting into the send queue.

Because we commit the tx only after inserting into the send queue,
this meant we were holding onto the database lock unnecessarily.

After this change,
we serialize messages **after** inserting into the send queue.
This means we serialize only after committing the tx.
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 a pull request may close this issue.

1 participant