memgraph / mage

MAGE - Memgraph Advanced Graph Extensions :crystal_ball:
Apache License 2.0
238 stars 23 forks source link

[BUG] Using collections.remove_all stops the docker container #475

Open ca-ryanjohn-velasco opened 1 month ago

ca-ryanjohn-velasco commented 1 month ago

Running a query using collections.remove_all with more than 500 keys will cause the server to stop

To Reproduce Steps to reproduce the behavior:

  1. Run the following query on memgraph lab UNWIND $keys as item WITH collect(DISTINCT item[0]['uuid']) AS inuuid, collect(DISTINCT item[1]['uuid']) AS outuuid MATCH (in:Interface)-[rel:EXPOSES]->(out:Port) WHERE in.uuid IN inuuid AND out.uuid IN outuuid WITH in, rel, out, LABELS(in) AS nodeInLabels, LABELS(out) AS nodeOutLabels WHERE size(collections.remove_all(nodeInLabels, ["Bloom_Perspective","FunctionalId","RefactorVersion"])) = 1 AND collections.remove_all(nodeInLabels, ["Bloom_Perspective","FunctionalId","RefactorVersion","Interface"]) = [] AND size(collections.remove_all(nodeOutLabels, ["Bloom_Perspective","FunctionalId","RefactorVersion"])) = 1 AND collections.remove_all(nodeOutLabels, ["Bloom_Perspective","FunctionalId","RefactorVersion","Port"]) = [] AND [ in{.uuid}, out{.uuid} ] in $keys RETURN rel{IN: in{.uuid}, REL: rel{ElementID: id(rel)}, OUT:out{.uuid}} as key ;
  2. Click on 'run query' network-db-export.zip keys.json
antejavor commented 1 month ago

Hi @ca-ryanjohn-velasco, thanks for opening the issue, we will look into this.

katarinasupe commented 1 month ago

This is Memgraph 2.14. @ca-ryanjohn-velasco can you share your whole config, logs and if there is anything else specific to your database setup and how you're running this query?

ca-ryanjohn-velasco commented 1 month ago

I am using 2.17. Attached is the config, log and video. memgraph.zip memgraph_2024-05-27.log