Skip to content

Commit

Permalink
MB-53954 Use specified memory quota for calculation
Browse files Browse the repository at this point in the history
1. If memory_quota is specified, use that for calculation
2. If "batch_size" option is specified in the WITH clause,
   do not recalculate and reset batch_size.

Change-Id: Ib710e8342646bd9e5664fb32bee78a09e1c05d8d
Reviewed-on: https://review.couchbase.org/c/query/+/180980
Reviewed-by: Sitaram Vemulapalli <sitaram.vemulapalli@couchbase.com>
Tested-by: Bingjie Miao <bingjie.miao@couchbase.com>
  • Loading branch information
miaobingjie committed Oct 8, 2022
1 parent 502f327 commit ea8c3be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions execution/context.go
Expand Up @@ -663,6 +663,10 @@ func (this *Context) UseRequestQuota() bool {
return this.memorySession != nil
}

func (this *Context) MemoryQuota() uint64 {
return this.memoryQuota
}

func (this *Context) ProducerThrottleQuota() uint64 {
return this.memoryQuota / 10
}
Expand Down

0 comments on commit ea8c3be

Please sign in to comment.