mirror of
https://github.com/minio/minio.git
synced 2025-02-27 21:39:15 -05:00
add load balance properly restClientFromHash() bucket/prefix (#14621)
spread out resuming further to other nodes
This commit is contained in:
parent
566cffe53d
commit
401958938d
@ -111,7 +111,7 @@ func (z *erasureServerPools) listPath(ctx context.Context, o *listPathOptions) (
|
|||||||
// If we don't have a list id we must ask the server if it has a cache or create a new.
|
// If we don't have a list id we must ask the server if it has a cache or create a new.
|
||||||
if o.ID != "" && !o.Transient {
|
if o.ID != "" && !o.Transient {
|
||||||
// Create or ping with handout...
|
// Create or ping with handout...
|
||||||
rpc := globalNotificationSys.restClientFromHash(o.Bucket)
|
rpc := globalNotificationSys.restClientFromHash(pathJoin(o.Bucket, o.Prefix))
|
||||||
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
var c *metacache
|
var c *metacache
|
||||||
@ -199,7 +199,7 @@ func (z *erasureServerPools) listPath(ctx context.Context, o *listPathOptions) (
|
|||||||
}
|
}
|
||||||
entries.truncate(0)
|
entries.truncate(0)
|
||||||
go func() {
|
go func() {
|
||||||
rpc := globalNotificationSys.restClientFromHash(o.Bucket)
|
rpc := globalNotificationSys.restClientFromHash(pathJoin(o.Bucket, o.Prefix))
|
||||||
if rpc != nil {
|
if rpc != nil {
|
||||||
ctx, cancel := context.WithTimeout(GlobalContext, 5*time.Second)
|
ctx, cancel := context.WithTimeout(GlobalContext, 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@ -415,7 +415,7 @@ func (z *erasureServerPools) listAndSave(ctx context.Context, o *listPathOptions
|
|||||||
filteredResults := o.gatherResults(ctx, outCh)
|
filteredResults := o.gatherResults(ctx, outCh)
|
||||||
|
|
||||||
mc := o.newMetacache()
|
mc := o.newMetacache()
|
||||||
meta := metaCacheRPC{meta: &mc, cancel: cancel, rpc: globalNotificationSys.restClientFromHash(o.Bucket), o: *o}
|
meta := metaCacheRPC{meta: &mc, cancel: cancel, rpc: globalNotificationSys.restClientFromHash(pathJoin(o.Bucket, o.Prefix)), o: *o}
|
||||||
|
|
||||||
// Save listing...
|
// Save listing...
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -361,7 +361,7 @@ func (r *metacacheReader) filter(o listPathOptions) (entries metaCacheEntriesSor
|
|||||||
|
|
||||||
func (er *erasureObjects) streamMetadataParts(ctx context.Context, o listPathOptions) (entries metaCacheEntriesSorted, err error) {
|
func (er *erasureObjects) streamMetadataParts(ctx context.Context, o listPathOptions) (entries metaCacheEntriesSorted, err error) {
|
||||||
retries := 0
|
retries := 0
|
||||||
rpc := globalNotificationSys.restClientFromHash(o.Bucket)
|
rpc := globalNotificationSys.restClientFromHash(pathJoin(o.Bucket, o.Prefix))
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if contextCanceled(ctx) {
|
if contextCanceled(ctx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user