Skip to content

Commit

Permalink
MB-52109 Do not use round robin planner in serverless deployment
Browse files Browse the repository at this point in the history
If the planner gives error, it is returned to the user. There is no
fallback on round robin planner as it can break the tenant
affinity/sub-clustering.

Change-Id: I4e08d3951a2aba616dc7d56bd7c0a53065241f48
  • Loading branch information
deepkaran committed Sep 14, 2022
1 parent c7cf437 commit 742f44b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions secondary/manager/client/metadata_provider.go
Expand Up @@ -1309,8 +1309,8 @@ func (o *MetadataProvider) recoverableCreateIndex(idxDefn *c.IndexDefn,
}
} else {
layout, definitions, err = o.plan(idxDefn, plan, watcherMap, allowLostReplica, actualNumReplica, enforceLimits)
//DEEPK add error here for resource limit reached
if err != nil && (strings.Contains(err.Error(), "Index already exist") || strings.Contains(err.Error(), c.ErrIndexScopeLimitReached.Error()) || strings.Contains(err.Error(), c.ErrIndexBucketLimitReached.Error())) {

if err != nil && (c.IsServerlessDeployment() || (strings.Contains(err.Error(), "Index already exist") || strings.Contains(err.Error(), c.ErrIndexScopeLimitReached.Error()) || strings.Contains(err.Error(), c.ErrIndexBucketLimitReached.Error()))) {
o.cancelPrepareIndexRequest(idxDefn.DefnId, watcherMap)
return err
}
Expand Down

0 comments on commit 742f44b

Please sign in to comment.