docs(job-array-one-based-index): GenerateJobID allocates ordinary IDs only
The comment still described arraySize > 1 as the array path; since task 9.1 idgen() rejects any size other than 1 and arrays use GenerateArrayJobID. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
63eaea215a
commit
bcd357c531
1 changed files with 4 additions and 3 deletions
|
|
@ -332,9 +332,10 @@ func initIDGen() {
|
||||||
C.idgen_ctx_init(&gIDCtx)
|
C.idgen_ctx_init(&gIDCtx)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateJobID calls the C idgen() to produce a unique job ID.
|
// GenerateJobID calls the C idgen() to produce a unique ordinary job ID.
|
||||||
// clusterID and apiserverID identify the originating instance;
|
// clusterID and apiserverID identify the originating instance. arraySize
|
||||||
// arraySize=1 for normal jobs, >1 for array jobs.
|
// must be 1: idgen() allocates ordinary IDs only and returns -EINVAL for
|
||||||
|
// any other size; array IDs come from GenerateArrayJobID.
|
||||||
func GenerateJobID(clusterID, apiserverID int, arraySize int) (uint64, error) {
|
func GenerateJobID(clusterID, apiserverID int, arraySize int) (uint64, error) {
|
||||||
idCtxOnce.Do(initIDGen)
|
idCtxOnce.Do(initIDGen)
|
||||||
var jobID C.uint64_t
|
var jobID C.uint64_t
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue