mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
re-use the same local drive used by remote-peer (#18645)
historically, we have always kept storage-rest-server and a local storage API separate without much trouble, since they both can independently operate due to no special state() between them. however, over some time, we have added state() such as - drive monitoring threads now there will be "2" of them per drive instead of just 1. - concurrent tokens available per drive are now twice instead of just single shared, allowing unexpectedly high amount of I/O to go through. - applying serialization by using walkMutexes can now be adequately honored for both remote callers and local callers.
This commit is contained in:
@@ -470,13 +470,19 @@ func newStorageRESTHTTPServerClient(t testing.TB) *storageRESTClient {
|
||||
t.Fatalf("UpdateIsLocal failed %v", err)
|
||||
}
|
||||
|
||||
endpoint.PoolIdx = 0
|
||||
endpoint.SetIdx = 0
|
||||
endpoint.DiskIdx = 0
|
||||
|
||||
poolEps := []PoolEndpoints{{
|
||||
Endpoints: Endpoints{endpoint},
|
||||
}}
|
||||
poolEps[0].SetCount = 1
|
||||
poolEps[0].DrivesPerSet = 1
|
||||
|
||||
// Register handlers on newly created servers
|
||||
registerStorageRESTHandlers(tg.Mux[0], []PoolEndpoints{{
|
||||
Endpoints: Endpoints{endpoint},
|
||||
}}, tg.Managers[0])
|
||||
registerStorageRESTHandlers(tg.Mux[1], []PoolEndpoints{{
|
||||
Endpoints: Endpoints{endpoint},
|
||||
}}, tg.Managers[1])
|
||||
registerStorageRESTHandlers(tg.Mux[0], poolEps, tg.Managers[0])
|
||||
registerStorageRESTHandlers(tg.Mux[1], poolEps, tg.Managers[1])
|
||||
|
||||
restClient, err := newStorageRESTClient(endpoint, false, tg.Managers[0])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user