phase168: reject oversized native submissions before enqueue

This commit is contained in:
pingqiu committed 2026-07-29 22:19:15 -07:00
1 parent 3c6f5c7b6f
commit 2eea54e64f
1 file changed
+7
@@ -49,6 +49,13 @@ func (executor *Executor) SubmitAndWait(operations []Operation) ([]Completion, e
if executor.closed {
return nil, errors.New("io_uring executor is closed")
}
if len(operations) > int(executor.stats.QueueDepth) {
return nil, fmt.Errorf(
"submission size %d exceeds queue depth %d",
len(operations),
executor.stats.QueueDepth,
)
}
raw := make([]ringOperation, len(operations))
for i, operation := range operations {