luckyframework / luckyframework/avram
Transaction considered committed even in nested scenarios
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/luckyframework/avram/blob/9b184d4b586d783b096a5d377eafd98c78e32026/src/avram/save_operation.cr#L319-L323
https://github.com/luckyframework/avram/blob/9b184d4b586d783b096a5d377eafd98c78e32026/src/avram/database.cr#L183-L185
If you had operations nested inside others, they're `after_commit` callbacks are ran when the operation is finished successfully and not when the transaction has actually committed which would be when the parent operation finishes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cited sections of src/avram/save_operation.cr at lines 319-323 and src/avram/database.cr at lines 183-185, then trace how nested operations finish and transactions commit. Done means after_commit callbacks from nested operations run only after the parent operation's transaction has actually committed, rather than when each nested operation finishes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100