playframework / playframework/play1
Improved documentation for transaction handling in jobs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
The current documentation regarding transactions in jobs boils down to "We've got you covered, Don't sweet it." Which is actually not helpful.
Describe the solution you'd like
We know, through the documentation, that each request gets its own transaction which is commited to the DB upon response.
Something similarly explicit would be helpful for jobs.
For example:
- Does a job started during a request share the same transaction as the request? If so, does the transaction wait for the completion of the job before being closed (even if it runs longer thena the request lasts)?
- Cron Jobs get their own transactions.
- Jobs started from within Jobs get their very own new transaction. The transaction of the parent job gets closed independently upon completion of the parent job.
- Jobs started with afterRequest() get their own transaction.
Additional context
I am using Play for years and this is still something I am not sure about. So the above may be wrong. Hence this ticket.
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
The payload names no files or tests. Start by locating the existing transaction and job documentation, then verify the behavior for request-started, cron, nested, and afterRequest() jobs against the relevant implementation. Done means the documentation explicitly answers all four cases and replaces the current vague wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100