feat(job-array-one-based-index): array ID allocation numbered from 1 (task 1.3)
idgen_array() allocates the next whole 32768 block and returns its first element (array tag, index 1), refusing n outside 1..32767 and a block past the 20-bit sequence (-EOVERFLOW, context unchanged). The reset-on-new-second step is shared with idgen() via idgen_tick_locked(); idgen() itself is unchanged until task 9.1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d027410304
commit
ef728435d4
4 changed files with 212 additions and 10 deletions
|
|
@ -16,7 +16,7 @@
|
|||
- Done when the libxce suite passes with new cases for a NULL buffer, a range, an oversized field and an index above 32767 all returning invalid-argument, the existing round trips still succeed, and the scheduler and harness suites still pass
|
||||
- _Requirements: 5.7, 5.14, 5.15_
|
||||
|
||||
- [ ] 1.3 (P) Add array ID allocation numbered from 1
|
||||
- [x] 1.3 (P) Add array ID allocation numbered from 1
|
||||
- Allocate the first element of an n-element array (1 to 32767) as the next whole 32768 block with element number 1, advancing the context past the block
|
||||
- Refuse a block that would leave the 20-bit sequence with an overflow result and leave the context unchanged; refuse n of 0 or above 32767
|
||||
- Leave the existing ordinary-ID allocation untouched in this task (its multi-element path is removed in 9.1, after its callers move)
|
||||
|
|
@ -239,3 +239,4 @@
|
|||
|
||||
## Implementation Notes
|
||||
- 1.2: `REGEX_JOBID`, `REGEX_JOBARRAY_ID` and `N_MAX_FIELDS_JOBID` (`src/include/config.h`) are now unused, and comments still describe regex-based `parse_jobid` in `src/scheduler/src/repl.c:143`, `src/harness/testsuite/test_test_cli.c:2324-2326` and `src/frontend/xcecli/common/format/jobid.go:86-93`; clean these up in 4.3 / 8.1 / 9.x where those files are touched. A direct `parse_jobid("...[0]")` accept test is a cheap addition when next touching `test_jobsel.c`.
|
||||
- 1.3: plain `idgen()` still has no sequence-overflow guard; after `idgen_array` takes block 31 the context sequence is 2^20, so a plain `idgen()` in the same second would spill into the timestamp (pre-existing class). Add an `-EOVERFLOW` check to plain `idgen()` in 9.1.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue