mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
phase168: reject oversized native submissions before enqueue
This commit is contained in:
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 {
|
||||
|
||||
Reference in new issue
Block a user