Skip to content

Conversation

@jmhrpr
Copy link
Contributor

@jmhrpr jmhrpr commented Sep 3, 2022

The comment suggests you planned to add this, and indeed it makes sense. This executes all the commands needed to process a particular block at once which means we can't query data as it is still being updated. This prevents, for example, race conditions when reading data while updating balances per transaction input/output.

The redis crate support for transactions does not seem suitable for our needs and also does not provide methods for the MULTI and EXEC commands required to perform a transaction, for this reason we manually create the commands. MULTI starts the transaction, and all commands that follow it are queued until a EXEC command is sent.

Is there any issues here where something might happen to prevent the EXEC to end the transaction being called?

@jmhrpr jmhrpr requested a review from scarmuega as a code owner September 3, 2022 20:20
Copy link
Member

@rvcas rvcas left a comment

Choose a reason for hiding this comment

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

nice

@scarmuega scarmuega merged commit eaf87ab into txpipe:main Sep 22, 2022
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.

3 participants