mirror of
https://github.com/minio/minio.git
synced 2025-11-29 05:19:03 -05:00
tests: Fix setting max openfds as memory limit (#20029)
The code was advertenly passing max openfds to debug.SetMemoryLimit(), fixing this accelerate go test in my machine. This is only a testing bug, since the server context has always a valid MaxMem, so the buggy code was never called in users environments.
This commit is contained in:
@@ -82,11 +82,7 @@ func setMaxResources(ctx serverCtxt) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ctx.MemLimit > 0 {
|
if ctx.MemLimit > 0 {
|
||||||
maxLimit = ctx.MemLimit
|
debug.SetMemoryLimit(int64(ctx.MemLimit))
|
||||||
}
|
|
||||||
|
|
||||||
if maxLimit > 0 {
|
|
||||||
debug.SetMemoryLimit(int64(maxLimit))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not use RLIMIT_AS as that is not useful and at times on systems < 4Gi
|
// Do not use RLIMIT_AS as that is not useful and at times on systems < 4Gi
|
||||||
|
|||||||
Reference in New Issue
Block a user