[BP 7.2.0 MB-53107] [N1QL] insert returning does not trigger memory quota

Description

Basically we are seeing that this insert does not trigger a memory quota exceeded

empty bucket default

curl -v -u Administrator:password http://172.23.104.110:8093/query/service -d 'statement=insert into default (key, value) values("1", { "abcd": { "def": repeat("abcd", 29990), "arr": array_repeat(repeat("efgh", 1000), 5000)}}) returning *&memory_quota=1'

but if we do select * from default; where the only document is above, we are seeing the memory quota is exceeded, but the returning in insert will return the exact same document

insert into default (key a, value v ) select a, { "abcd": { "def": repeat("abcd", 29990), "arr": array_repeat(repeat("efgh", 1000), 5000)}} as v from ["1"] as a returning abcd.def ;

this does trigger memory quota error

Components

Affects versions

Fix versions

Labels

Environment

7.1.2-3390

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

Activity

Show:

Ajay Pal Bhullar March 8, 2023 at 2:51 AM

verified in 7.2.0-5234, now the curl in the description returns a memory quota error with and without the returning, and checked memory quotes <20 >20 and 20

CB robot December 7, 2022 at 9:50 PM

Build couchbase-server-7.2.0-5050 contains query commit 7be4698 with commit message:
track quota for insert

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Is this a Regression?

No

Triage

Untriaged

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 7, 2022 at 4:50 PM
Updated March 8, 2023 at 2:51 AM
Resolved December 7, 2022 at 4:53 PM
Instabug