Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@knakatasf
Copy link
Contributor

@knakatasf knakatasf commented Nov 12, 2025

Scope & Purpose

  • All the functions in ObjectFunctions.cpp should return supervised AqlValue.

  • All the functions take ExpressionContext, which is either of 'ExecutorExpressionContext' or 'FixedVarExpressionContext'.

  • Takes ResourceMonitor from ExpressionContext, and pass it the AqlValue ctor.

  • 💩 Bugfix

  • 🍕 New feature

  • 🔥 Performance improvement

  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0: (Please link PR)
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

Note

ObjectFunctions now return supervised AqlValue, wiring ResourceMonitor from ExpressionContext and using SupervisedBuffer-backed builders where available.

  • AQL ObjectFunctions supervision
    • Wire ResourceMonitor from ExecutorExpressionContext/FixedVarExpressionContext and pass to AqlValue constructors.
    • Use velocypack::SupervisedBuffer for builders when a monitor is present.
    • Update return paths to supervised values in MERGE(_RECURSIVE), UNSET(_RECURSIVE), KEEP(_RECURSIVE), TRANSLATE, ATTRIBUTES, VALUES, Value, ZIP, and ENTRIES.
    • Include Aql/FixedVarExpressionContext.h; minor include cleanup.

Written by Cursor Bugbot for commit a914bb2. This will update automatically on new commits. Configure here.

@cla-bot cla-bot bot added the cla-signed label Nov 12, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on November 28

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

AqlValue functions::Unset(ExpressionContext* expressionContext, AstNode const&,
VPackFunctionParametersView parameters) {
auto* fixedCtx = dynamic_cast<FixedVarExpressionContext*>(expressionContext);
ResourceMonitor* rm = fixedCtx ? &fixedCtx->resourceMonitor() : nullptr;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Type Confusion Hides Resource Monitor

Inconsistent expression context casting across functions causes ResourceMonitor to be nullptr in many cases. Some functions cast to FixedVarExpressionContext* while others cast to ExecutorExpressionContext*, but both types can be passed. Since both inherit from QueryExpressionContext which provides resourceMonitor(), the cast is unnecessary and causes the resource monitor to be lost when the wrong type is assumed. This defeats the purpose of supervised AqlValue returns.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants