Skip to content

[#125] Ensuring objects are deleted properly #300

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

Merged
merged 24 commits into from
Mar 24, 2025

Conversation

angeloprobst
Copy link
Contributor

test.metta.gz

Steps to run:

  1. Start Redis (port 29000) and Mongo (port 28000) and load them with the attached test.metta.gz file (use das-cli for that).
  2. Ensure the following vars are set on your local env:
DAS_MONGODB_HOSTNAME=localhost
DAS_MONGODB_PASSWORD=dassecret
DAS_MONGODB_PORT=28000
DAS_MONGODB_USERNAME=dbadmin
DAS_REDIS_HOSTNAME=localhost
DAS_REDIS_PORT=29000
  1. From the repo root, build all: make build-all
  2. From the repo root, run AB: make run-attention-broker
  3. In a separate terminal, from the repo root, run Query Agent: make run-query-agent
  4. In a separate terminal, from the repo root, run the following query:
bash -x src/scripts/run.sh query \
  "localhost:31701" \
  "localhost:31700" \
  AND 2 \
    LINK_TEMPLATE Expression 3 \
      NODE Symbol Contains \
      VARIABLE sentence1 \
      LINK Expression 2 \
        NODE Symbol Word \
        NODE Symbol '"bbb"' \
    LINK_TEMPLATE Expression 3 \
      NODE Symbol Contains \
      VARIABLE sentence2 \
      LINK Expression 2 \
        NODE Symbol Word \
        NODE Symbol '"aaa"'
  1. Check the amount of memory allocated by the Query Agent:
ps faux | grep 'query_broker 31700' | grep -Ev '(docker|grep|bash)'

Expected output (in this example, QA allocated ~311MB):
image

  1. Execute the steps 6 and 7 multiple times to check if the memory grows continuously.

@angeloprobst angeloprobst marked this pull request as ready for review March 18, 2025 17:54
@angeloprobst angeloprobst merged commit d75a4a4 into master Mar 24, 2025
1 check passed
@angeloprobst angeloprobst deleted the angelo/#125/fixing-memory-leaks--adding-deletions branch March 24, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant