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:
Rongsong Shen 2026-10-01 13:18:15 +00:00
parent 63eaea215a
commit bcd357c531
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C

View file

@ -332,9 +332,10 @@ func initIDGen() {
C.idgen_ctx_init(&gIDCtx)
}
// GenerateJobID calls the C idgen() to produce a unique job ID.
// clusterID and apiserverID identify the originating instance;
// arraySize=1 for normal jobs, >1 for array jobs.
// GenerateJobID calls the C idgen() to produce a unique ordinary job ID.
// clusterID and apiserverID identify the originating instance. arraySize
// 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) {
idCtxOnce.Do(initIDGen)
var jobID C.uint64_t