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

feature: transactions with single-threaded execution context #685

Merged
merged 8 commits into from
Apr 20, 2022

Conversation

gvolpe
Copy link
Member

@gvolpe gvolpe commented Apr 18, 2022

fixes #681

This seems to be working reliably. It still requires more testing and thoughts on user experience, but reliability comes first. I will be away for a few weeks, so this is all I got until I'm back.

The new implementation is named RedisTx and there is an example named RedisTxDemo showing how it works. This is the expected output (or similar) when running it:

[info] running dev.profunktor.redis4cats.RedisTxDemo
test1: foo
test2: bar
multi: pool-412-thread-1
set: pool-412-thread-1
set: pool-412-thread-1
set: pool-412-thread-1
set: pool-412-thread-1
exec: pool-412-thread-1
test1: nix
test2: linux
keep doing stuff...
KV: Map(test1-v1 -> sad, test1-v2 -> nix)
19:13:34.580 [io-compute-2] INFO  d.profunktor.redis4cats.LoggerIOApp - Releasing Commands connection: redis://localhost
19:13:34.583 [io-compute-2] INFO  d.profunktor.redis4cats.LoggerIOApp - Releasing Redis connection: RedisURI(redis://localhost)

I added a method that shows the current thread where each operation runs (needs to be all the same thread), which will be removed before this PR gets merged.

The final KV: Map(...) is the result of the GET operations. This is the part that requires more UX thoughts.

@gvolpe gvolpe marked this pull request as ready for review April 19, 2022 18:05
@gvolpe gvolpe merged commit 4f5ae56 into series/1.x Apr 20, 2022
@gvolpe gvolpe deleted the feature/transactions-eval-model branch April 20, 2022 15:14
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.

Transactions & Pipeline: the current issue and ideas to fix it
1 participant