Reference specs: document signal handling in populate() (SIGTERM mechanics)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Read src/reference/specs/autopopulate.md and job-metadata.md, then verify the described behavior against autopopulate.py and the worker code. Add a “Signals and interruption” section covering handler scope, transaction and job-state consequences, redo versus lost work, and orphaned-job reclaim via refresh(orphan_timeout=...).
Written by the indexing model from the issue text.
Description
The job-reservation reference specs (src/reference/specs/autopopulate.md, job-metadata.md) say nothing about signal handling, yet datajoint-python has specific, load-bearing SIGTERM behavior during populate() that operators of distributed workers depend on:
populate()installs a SIGTERM handler for the duration of each cycle; a SIGTERM mid-make()raisesSystemExit, which escapesexcept Exception(sosuppress_errors=Truedoes not swallow it), cancels the open transaction, and records the job aserrorwith a%SIGTERM%message.%SIGTERM%is in the permanent-error patterns, so the worker's next cycle deletes the matching error row and the key re-queues — the interrupted work is redone, not lost.- By contrast, a signal with no installed handler (default disposition: terminate) kills the process outright: no transaction cancel, no
jobs.error()row — the job staysreserveduntil reclaimed viarefresh(orphan_timeout=...).
None of this is derivable from the current specs, and it matters for anyone designing worker lifecycle management, container orchestration (SIGTERM on pod eviction), or graceful-drain schemes on top of DataJoint. Suggested home: a "Signals and interruption" section in autopopulate.md covering the handler's scope, the transaction/job-state consequences, the redo-vs-lost distinction, and the orphaned-job reclaim path. Verify the exact mechanics against autopopulate.py/the worker code at writing time rather than from this summary.
- Dominant language
- Jupyter Notebook
- Stars
- 7
- Forks
- 12
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
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.
More from datajoint/datajoint-docs
-
datajoint/datajoint-docs#267 · 9 comments · 1 assignee ·
All issues in datajoint/datajoint-docs
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·