-
Notifications
You must be signed in to change notification settings - Fork 871
[DO NOT MERGE] Feature/supervised aql value #22034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦COMPILE, just pushed to have the current changes)
β¦ervised-aql-value
β¦stead of first byte of payload
β¦ervised-aql-value
β¦ervised-aql-value
β¦ervised-aql-value
β¦angodb into feature/supervised-aql-value
β¦(), fix memoryUsage
β¦ervised-aql-value
β¦angodb into feature/supervised-aql-value
β¦k object in test
β¦ervised-aql-value
β¦ervised-aql-value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: ID Extraction Lacks Resource Monitoring
In the get function with vector of names, when s.isCustom() is true and the path ends with _id, the returned AqlValue from extractIdString doesn't receive the rm (ResourceMonitor) parameter. This causes memory accounting inconsistency when the source is a VPACK_SUPERVISED_SLICE, similar to the bug in getIdAttribute at line 436.
arangod/Aql/AqlValue.cpp#L591-L598
arangodb/arangod/Aql/AqlValue.cpp
Lines 591 to 598 in 789fd96
| return AqlValue{AqlValueHintNull{}}; | |
| } else if (s.isCustom()) { | |
| // _id needs special treatment | |
| if (i + 1 == n) { | |
| // x.y._id | |
| mustDestroy = true; | |
| return AqlValue( | |
| transaction::helpers::extractIdString(&resolver, s, prev)); |
β¦ervised-aql-value
Scope & Purpose
(Please describe the changes in this PR for reviewers, motivation, rationale - mandatory)
Checklist
Related Information
(Please reference tickets / specification / other PRs etc)
Note
Introduce a new AqlValue kind that stores VPack with ResourceMonitor accounting, extend constructors/ops to use it, and add comprehensive unit tests.
AqlValueTypeVPACK_SUPERVISED_SLICEwith ResourceMonitor-aware allocation, cloning, and destruction.string_view,Buffer,Slice,DocumentData,AqlValueHintSliceCopy) to accept optionalResourceMonitor*and create supervised slices.is*),slice(),getTypeString(),length(),toVelocyPack(),destroy(),memoryUsage(), andrequiresDestruction()to handle supervised slices.at(),get(),getKeyAttribute(),getIdAttribute(),getFromAttribute(),getToAttribute(),hasKey()) to optionally copy under supervision and return slice-pointers when not copying.setSupervisedData(),allocateSupervised(),deallocateSupervised(); adjustdata()to return payload; support inCompare,hash, andstd::equal_to(content-equality across managed/supervised).operator==/!=forAqlValue.tests/Aql/AqlValueSupervisedTest.cppcovering construction, memory accounting, accessors, conversions, cloning, comparison, and destruction for supervised slices.tests/Basics/SupervisedBufferTest.cppto use new ctor signatures; include new test intests/CMakeLists.txt.Written by Cursor Bugbot for commit 676a00c. This will update automatically on new commits. Configure here.