Skip to content

Comments

refactor: decouple Transaction from Jedis#4440

Open
ggivo wants to merge 2 commits intomasterfrom
topic/ggivo/decople-transactions-from-jedis
Open

refactor: decouple Transaction from Jedis#4440
ggivo wants to merge 2 commits intomasterfrom
topic/ggivo/decople-transactions-from-jedis

Conversation

@ggivo
Copy link
Collaborator

@ggivo ggivo commented Feb 20, 2026

Summary

Removes direct Jedis reference from Transaction class to reduce coupling.

Changes

  • Added protected hook methods onAfterExec() and onAfterDiscard() in Transaction
  • Jedis.multi() now creates an anonymous subclass that overrides these hooks to call resetState()
  • Removed Jedis field from Transaction

Testing

Verified by TransactionCommandsTest ✅

Remove direct Jedis reference from Transaction class by introducing
protected hook methods onAfterExec() and onAfterDiscard(). Jedis now
creates an anonymous Transaction subclass that overrides these hooks
to invoke resetState().
@ggivo ggivo added this to the 7.4.0 milestone Feb 20, 2026
@ggivo ggivo added the techdebt Things that can be improved or refactored label Feb 20, 2026
@github-actions
Copy link

github-actions bot commented Feb 20, 2026

Test Results

   303 files  ±0     303 suites  ±0   12m 9s ⏱️ +22s
10 914 tests ±0  10 697 ✅ ±0  217 💤 ±0  0 ❌ ±0 
 2 846 runs  ±0   2 837 ✅ ±0    9 💤 ±0  0 ❌ ±0 

Results for commit da7766f. ± Comparison against base commit 815ede0.

♻️ This comment has been updated with latest results.

@ggivo ggivo self-assigned this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

techdebt Things that can be improved or refactored

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant