Coder Social home page Coder Social logo

redisgraph / redisgraph Goto Github PK

View Code? Open in Web Editor NEW
2.0K 50.0 228.0 63.76 MB

A graph database as a Redis module

Home Page: https://redis.io/docs/stack/graph/

License: Other

C 48.91% C++ 1.04% Makefile 0.34% Python 23.81% Gherkin 25.18% Dockerfile 0.01% Shell 0.67% CMake 0.04%
graphdb redis module opencypher redisgraph graphdatabase graph-database cypher nosql graph

redisgraph's Introduction

Release CircleCI Dockerhub Codecov Bounty

RedisGraph

A graph database module for Redis

Forum Discord


RedisGraph is now in maintenance mode.

As of July 5th, 2023 RedisGraph is no longer under active development. We do not plan to release new features (2.12 is the last feature-bearing release), but we will continue to release patches until January 31, 2025.

We are grateful to the RedisGraph community for their interest and support.

You can read more about the end of life of RedisGraph here.

There is an actively maintained fork of RedisGraph, in the form of FalkorDB.


RedisGraph is the first queryable Property Graph database to use sparse matrices to represent the adjacency matrix in graphs and linear algebra to query the graph.

Primary features:

  • Adopting the Property Graph Model
    • Nodes (vertices) and Relationships (edges) that may have attributes
    • Nodes can have multiple labels
    • Relationships have a relationship type
  • Graphs represented as sparse adjacency matrices
  • OpenCypher with proprietary extensions as a query language
    • Queries are translated into linear algebra expressions

To see RedisGraph in action, visit Demos. To read the docs, visit redis.io.

Quickstart

  1. Trying RedisGraph
  2. Docker
  3. Build
  4. Start
  5. Use from any client

Give it a try

Once loaded you can interact with RedisGraph using redis-cli.

Here we'll quickly create a small graph representing a subset of motorcycle riders and teams taking part in the MotoGP league, once created we'll start querying our data.

With redis-cli

The format of results through redis-cli is described in the RedisGraph documentation.

$ redis-cli
127.0.0.1:6379> GRAPH.QUERY MotoGP "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"
1) 1) Labels added: 2
   2) Nodes created: 6
   3) Properties set: 6
   4) Relationships created: 3
   5) "Query internal execution time: 0.399000 milliseconds"

Now that our MotoGP graph is created, we can start asking questions, for example: Who's riding for team Yamaha?

127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name, t.name"
1) 1) "r.name"
   2) "t.name"
2) 1) 1) "Valentino Rossi"
      2) "Yamaha"
3) 1) "Query internal execution time: 0.625399 milliseconds"

How many riders represent team Ducati?

127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)"
1) 1) "count(r)"
2) 1) 1) (integer) 1
3) 1) "Query internal execution time: 0.624435 milliseconds"

Building

Compiling

Requirements:

  • The RedisGraph repository: git clone --recurse-submodules -j8 https://github.com/RedisGraph/RedisGraph.git

  • On Ubuntu Linux, run: apt-get install build-essential cmake m4 automake peg libtool autoconf python3

  • On OS X, verify that homebrew is installed and run: brew install cmake m4 automake peg libtool autoconf.

    • The version of Clang that ships with the OS X toolchain does not support OpenMP, which is a requirement for RedisGraph. One way to resolve this is to run brew install gcc g++ and follow the on-screen instructions to update the symbolic links. Note that this is a system-wide change - setting the environment variables for CC and CXX will work if that is not an option.

To build, run make in the project's directory.

Congratulations! You can find the compiled binary at src/redisgraph.so.

Running tests

First, install required Python packages by running pip install -r requirements.txt from the tests directory.

If you've got redis-server in PATH, just invoke make test.

Otherwise, invoke REDIS_SERVER=<redis-server-location> make test.

For more verbose output, run make test V=1.

Building in a docker

The RedisGraph build system runs within docker. For detailed instructions on building, please see here.

Loading RedisGraph into Redis

RedisGraph is hosted by Redis, so you'll first have to load it as a Module to a Redis server. Redis 6.2 is required for RedisGraph 2.12.

We recommend having Redis load RedisGraph during startup by adding the following to your redis.conf file:

loadmodule /path/to/module/src/redisgraph.so

In the line above, replace /path/to/module/src/redisgraph.so with the actual path to RedisGraph's library. If Redis is running as a service, you must ensure that the redis user (default) has the necessary file/folder permissions to access redisgraph.so.

Alternatively, you can have Redis load RedisGraph using the following command line argument syntax:

~/$ redis-server --loadmodule /path/to/module/src/redisgraph.so

Lastly, you can also use the MODULE LOAD command. Note, however, that MODULE LOAD is a dangerous command and may be blocked/deprecated in the future due to security considerations.

Once you've successfully loaded RedisGraph your Redis log should have lines similar to:

...
30707:M 20 Jun 02:08:12.314 * Module 'graph' loaded from <redacted>/src/redisgraph.so
...

If the server fails to launch with output similar to:

# Module /usr/lib/redis/modules/redisgraph.so failed to load: libgomp.so.1: cannot open shared object file: No such file or directory
# Can't load module from /usr/lib/redis/modules/redisgraph.so: server aborting

The system is missing the run-time dependency OpenMP. This can be installed on Ubuntu with apt-get install libgomp1, on RHEL/CentOS with yum install libgomp, and on OSX with brew install libomp.

Using RedisGraph

You can call RedisGraph's commands from any Redis client.

With redis-cli

$ redis-cli
127.0.0.1:6379> GRAPH.QUERY social "CREATE (:person {name: 'roi', age: 33, gender: 'male', status: 'married'})"

With any other client

You can interact with RedisGraph using your client's ability to send raw Redis commands.

Depending on your client of choice, the exact method for doing that may vary.

Python example

This code snippet shows how to use RedisGraph with raw Redis commands from Python via redis-py:

import redis

r = redis.StrictRedis()
reply = r.execute_command('GRAPH.QUERY', 'social', "CREATE (:person {name:'roi', age:33, gender:'male', status:'married'})")

Client libraries

Some languages have client libraries that provide support for RedisGraph's commands:

Project Language License Author Stars Package Comment
jedis Java MIT Redis Stars Maven
redis-py Python MIT Redis Stars pypi
node-redis Node.JS MIT Redis Stars npm
nredisstack .NET MIT Redis Stars nuget
redisgraph-rb Ruby BSD Redis redisgraph-rb-stars GitHub
redisgraph-go Go BSD Redis redisgraph-go-stars GitHub
rueidis Go Apache 2.0 Rueian rueidis-stars GitHub
ioredisgraph JavaScript ISC Jonah ioredisgraph-stars GitHub
@hydre/rgraph JavaScript MIT Sceat rgraph-stars GitHub
php-redis-graph PHP MIT KJDev php-redis-graph-stars GitHub
redisgraph_php PHP MIT jpbourbon redisgraph_php-stars GitHub
redisgraph-ex Elixir MIT crflynn redisgraph-ex-stars GitHub
redisgraph-rs Rust MIT malte-v redisgraph-rs-stars GitHub
redis_graph Rust BSD tompro redis_graph-stars GitHub
rustis Rust MIT Dahomey Technologies rustis-stars Crate Documentation
NRedisGraph C# BSD tombatron NRedisGraph-stars GitHub
RedisGraph.jl Julia MIT xyxel RedisGraph.jl-stars GitHub

Documentation

Read the docs at redisgraph.io.

Mailing List / Forum

Got questions? Feel free to ask at the RedisGraph forum.

License

Licensed under your choice of the Redis Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1). See LICENSE.

redisgraph's People

Contributors

alonre24 avatar aviavni avatar chayim avatar chrisatredislabs avatar danitseitlin avatar dvirdukhan avatar filipecosta90 avatar gkorland avatar iddm avatar itamarhaber avatar jeffreylovitz avatar k-jo avatar leibale avatar liorkogan avatar meirshpilraien avatar nafraf avatar nermiller avatar odanoburu avatar ofirmos avatar omrib1 avatar rafie avatar raz-mon avatar rueian avatar sazzad16 avatar sel-fish avatar simonprickett avatar slorello89 avatar snyk-bot avatar swilly22 avatar tomerhekmati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redisgraph's Issues

Support indices

Support
CREATE INDEX
DROP INDEX

Also introduce index scan as an execution plan operation.

Execution plan refactoring

Instead of an external executor controlling the actual execution have the operations dictate execution flow.

Also as a prerequisite for WITH clause, have each execution plan operator return a result-set record.

Redis Graph - Frequent Crash

I'm running redis-graph in Docker and am getting frequent crashes. I have attached the output, so hopefully that helps. Any idea what's going on here? I've had this happen about 6 times in the last couple of hours. In this instance I was just running a create. Thanks in advance!
log.txt

order by with aggregation

Is it possible to do order by on an aggregation field? In the imdb demo, I am trying to list the top 10 movies with maximum number of actors.
I am running the following query:
GRAPH.QUERY imdb "match (a:actor)-[:act]->(m:movie) return m.title, count(a) order by count(a) desc limit 10"

I get a syntax error.

Support for count distinct

It seems that count(distinct x) is not supported. Can only do distinct on a where clause.
Here's an example of a query I could use that:

Number of clubs required to set up each national team:
GRAPH.QUERY euro2016 'MATCH (c:Club)<-[:PLAYS_FOR]-(p:Player)-[:REPRESENTS]->(n:NationalTeam) return n.name, count(distinct c.name)'

Execution plan optimisations:

  1. Pick execution starting point, favour traverse + filter over just traversal.
  2. Reduce filters into a linear expression.
  3. Reduce traversals

Erroneous labels match after node deletion

Node deletion causes a compacting step in which deleted IDs are re-assigned to keep matrices small.

Currently, these ID updates can create incorrect results on subsequent matches.

For example, the following:

127.0.0.1:6379> GRAPH.QUERY imdb "MATCH (a:actor) WHERE a.age < 100 DELETE a"
1) (empty list or set)
2) 1) Nodes deleted: 1317

Deletes all but 1 actor node. Subsequently:

```127.0.0.1:6379> GRAPH.QUERY imdb "MATCH (a:actor) RETURN a, ID(a)"
1)   1) 1) "a.name"
        2) "a.age"
        3) "ID(a)"
     2) 1) "NULL"
        2) "NULL"
        3) "0"   
     3) 1) "NULL"
        2) "NULL"
        3) "2"   
     4) 1) "NULL"
        2) "NULL"
        3) "3"   
     5) 1) "NULL"
        2) "NULL"
        3) "4"   
     6) 1) "NULL"
        2) "NULL"
        3) "5"   
[...]
   164) 1) "NULL"
        2) "NULL"
        3) "190"
   165) 1) "Vincent Price"
        2) "107.000000"
        3) "191"
   166) 1) "NULL"
        2) "NULL"
        3) "192"```

244 rows total are returned, 243 of which are NULL.

Support paths

Introduce a path object and implement shortest path.

Segfault in ORDER heapsort with larger data sets

127.0.0.1:6379> GRAPH.QUERY wiki "MATCH (a:wikipage) RETURN a ORDER BY a.name"                                                                                                                                                        
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      
=== REDIS BUG REPORT START: Cut & paste starting from here ===                                                                                                                                                                        
16775:M 08 Aug 13:52:16.695 # Redis 999.999.999 crashed by signal: 11                                                                                                                                                                 
16775:M 08 Aug 13:52:16.695 # Crashed running the instruction at: 0x7f8eed4df9d5                                                                                                                                                      
16775:M 08 Aug 13:52:16.695 # Accessing address: (nil)                                                                                                                                                                                
16775:M 08 Aug 13:52:16.695 # Failed assertion: <no assertion failed> (<no file>:0)                                                                                                                                                   
                                                                                                                                                                                                                                      
------ STACK TRACE ------                                                                                                                                                                                                             
EIP:                                                                                                                                                                                                                                  
/lib/x86_64-linux-gnu/libc.so.6(+0x14a9d5)[0x7f8eed4df9d5]                                                                                                                                                                            
                                                                                                                                                                                                                                      
Backtrace:                                                                                                                                                                                                                            
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(logStackTrace+0x45)[0x46c925]                                                                                                                                 
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(sigsegvHandler+0xb9)[0x46d0e9]                                                                                                                                
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f8eed770390]                                                                                                                                                                       
/lib/x86_64-linux-gnu/libc.so.6(+0x14a9d5)[0x7f8eed4df9d5]                                                                                                                                                                            
/home/laptop-linux/dev/redis/graph/src/redisgraph.so(SIValue_Compare+0x56)[0x7f8eeab8fb12]

GDB:

Thread 1 "redis-server" received signal SIGSEGV, Segmentation fault.
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:165
165     ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
(gdb) bt
#0  __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:165
#1  0x00007f8eeab8fb12 in SIValue_Compare (a=..., b=...) at /home/laptop-linux/dev/redis/graph/src/value.c:419
#2  0x00007f8eeabc624e in Records_Compare (A=0xf20ad00, B=0xf1c49c0, compareIndices=0x8ea6600,
    compareIndicesLen=1) at /home/laptop-linux/dev/redis/graph/src/resultset/record.c:63
#3  0x00007f8eeabc3dee in _heap_elem_compare (A=0xf20ad00, B=0xf1c49c0, udata=0x8ea4f30)
    at /home/laptop-linux/dev/redis/graph/src/resultset/resultset.c:19
#4  0x00007f8eeabc841e in __pushup (h=0x1cceb420, idx=2) at /home/laptop-linux/dev/redis/graph/src/util/heap.c:106
#5  0x00007f8eeabc8589 in __heap_offerx (h=0x1cceb420, item=0xf20ad00)
    at /home/laptop-linux/dev/redis/graph/src/util/heap.c:157
#6  0x00007f8eeabc8620 in heap_offer (h=0x7ffec67cf0e0, item=0xf20ad00)
    at /home/laptop-linux/dev/redis/graph/src/util/heap.c:173
#7  0x00007f8eeabc45bc in _sortResultSet (set=0x8ea4f30, records=0x8ea53d0)
    at /home/laptop-linux/dev/redis/graph/src/resultset/resultset.c:160
#8  0x00007f8eeabc5052 in ResultSet_Replay (set=0x8ea4f30)
    at /home/laptop-linux/dev/redis/graph/src/resultset/resultset.c:406
#9  0x00007f8eeab90b31 in MGraph_Query (ctx=0x7ffec67cf250, argv=0x7f8ee7dea7c0, argc=3)
    at /home/laptop-linux/dev/redis/graph/src/module.c:117
#10 0x0000000000496c1f in RedisModuleCommandDispatcher (c=<optimized out>) at module.c:466
#11 0x000000000042c5c6 in call (c=c@entry=0x7f8eecb5da00, flags=flags@entry=15) at server.c:2244
#12 0x000000000042ccc7 in processCommand (c=0x7f8eecb5da00) at server.c:2526
#13 0x000000000043cb45 in processInputBuffer (c=0x7f8eecb5da00) at networking.c:1369
#14 0x00000000004263de in aeProcessEvents (eventLoop=eventLoop@entry=0x7f8eeca36050, flags=flags@entry=11)
    at ae.c:421
#15 0x000000000042680b in aeMain (eventLoop=0x7f8eeca36050) at ae.c:464
#16 0x0000000000423386 in main (argc=<optimized out>, argv=0x7ffec67cf568) at server.c:3914

I haven't dug into this yet, but I feel like an easy solution would just be to replace the heap sort! I'll take it on if desired.

Build fails on OSX

Tried a build from master branch today on OSX and and got the following.

[ 0%] Building C object CMakeFiles/graphblas.dir/Source/GB_AxB_builtin.c.o
In file included from ../redisgraph/deps/GraphBLAS/Source/GB_AxB_builtin.c:19:
../redisgraph/deps/GraphBLAS/Source/GB.h:1527:1: error: thread-local storage is not supported for the current target
_Thread_local extern GB_thread_local_struct GB_thread_local ;
^
1 error generated.

Can I compile redis-graph on MS Windows 10 x64 ?

I've compiled redis-server on MS Windows 10 (using MSYS2 MinGW tools), but failed to compile redis-graph. The error message seems to show that redis-graph doesn't compile on MS Windows...

D:\hintsnet-wudi\develop\scaffold\hintsnet-redisgraph\redis-graph-master>make
make -C ./src all
make[1]: Entering directory '/d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src'
cc -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-result -fPIC -D_GNU_SOURCE -std=gnu99 -I"/d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src" -DREDIS_MODULE_TARGET -g -ggdb -O3  -mmacosx-version-min=10.12 -c /d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src/delete_graph.c -o /d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src/delete_graph.o -MMD -MF /d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src/delete_graph.d
cc: error: unrecognized command line option '-mmacosx-version-min=10.12'
make[1]: *** [Makefile:71: /d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src/delete_graph.o] Error 1
make[1]: Leaving directory '/d/hintsnet-wudi/develop/scaffold/hintsnet-redisgraph/redis-graph-master/src'
make: *** [Makefile:2: all] Error 2

So, is it possible to compile redis-graph on MS Windows, when the cc options are probably set? ๐Ÿ˜…

redis-graph opencypher support and misc questions

Hi, I just wanted to say that this project is awesome ๐Ÿ’ฏ , after doing some testing I can see how amazingly fast it is โšก๏ธ ๐Ÿ™Œ

I have a couple of questions about redis-graph module:

  • Is it tested to work on cluster architecture?
  • I know about the clauses supported for opencypher, and I know SKIP is not supported yet, only LIMIT, but is there way to paginate without using SKIP?
  • Is it recommended to use redisgraph-py package?

Sidenote: I was hesitant to post in stackoverflow because there are only a few questions there, but if there is a better channel to ask these kind of things let me know, sorry for the inconvenient.

Flushdb and flashall crash the server.

This is the server console output:

=== REDIS BUG REPORT START: Cut & paste starting from here ===
9033:M 21 Jun 20:36:53.422 # Redis 3.9.103 crashed by signal: 11
9033:M 21 Jun 20:36:53.422 # Crashed running the instuction at: 0x7fc5331e9b98
9033:M 21 Jun 20:36:53.422 # Accessing address: 0x3bf30d0
9033:M 21 Jun 20:36:53.422 # Failed assertion: (:0)

------ STACK TRACE ------
EIP:
/home/ubuntu/redis-4.0-rc3/src/modules/redis-graph/src/redisgraph.so(raxRecursiveFree+0x48)[0x7fc5331e9b98]

Backtrace:
./redis-server 127.0.0.1:6379(logStackTrace+0x45)[0x46a025]
./redis-server 127.0.0.1:6379(sigsegvHandler+0xb9)[0x46a7e9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fc5354df390]
/home/ubuntu/redis-4.0-rc3/src/modules/redis-graph/src/redisgraph.so(raxRecursiveFree+0x48)[0x7fc5331e9b98]

------ INFO OUTPUT ------

Server

redis_version:3.9.103
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:d7d4ab0dbbc9a1c4
redis_mode:standalone
os:Linux 4.4.0-1061-aws x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:5.4.0
process_id:9033
run_id:95b373a16ffc5badce6a1c708955ec966494208e
tcp_port:6379
uptime_in_seconds:9
uptime_in_days:0
hz:10
lru_clock:2886757
executable:/home/ubuntu/redis-4.0-rc3/src/./redis-server
config_file:/home/ubuntu/redis-4.0-rc3/redis.conf

Clients

connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

Memory

used_memory:829056
used_memory_human:809.62K
used_memory_rss:18006016
used_memory_rss_human:17.17M
used_memory_peak:951984
used_memory_peak_human:929.67K
used_memory_peak_perc:87.09%
used_memory_overhead:815758
used_memory_startup:765824
used_memory_dataset:13298
used_memory_dataset_perc:21.03%
total_system_memory:15768764416
total_system_memory_human:14.69G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:21.72
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0

Persistence

loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1529613404
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

Stats

total_connections_received:2
total_commands_processed:22
instantaneous_ops_per_sec:0
total_net_input_bytes:157808
total_net_output_bytes:5384
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

Replication

role:master
connected_slaves:0
master_replid:a184f08bc53233337269b8ef4dce60abb7fdb2d4
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

CPU

used_cpu_sys:0.01
used_cpu_user:0.09
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

Commandstats

cmdstat_exists:calls=1,usec=1,usec_per_call=1.00

Cluster

cluster_enabled:0

Keyspace

db0:keys=6,expires=0,avg_ttl=0

------ CLIENT LIST OUTPUT ------
id=3 addr=127.0.0.1:53002 fd=7 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=flushall

------ CURRENT CLIENT INFO ------
id=3 addr=127.0.0.1:53002 fd=7 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=flushall
argv[0]: 'FLUSHALL'
Segmentation fault (core dumped)

Support constant node id - id(n)

id(n) should be supported across the API e.g.

match (n)-[r]->(m) return id(n),id(m) LIMIT 25 # supported

match (n)-[r]->(m) where id(n)=2 return id(m) LIMIT 25 # not supported

Redundant entities

CREATE (a), (b), (a)-[]->(b)
Would result in a CREATE clause representation with 4 nodes, which is implications on the query-graph and the execution plan (op_create).

try to remove redundant entities as early as possible.

Weird result sets

127.0.0.1:6379> graph.query a "CREATE (jim:person{name:'Jim', age:29})-[friends]->(pam:person {name:'Pam', age:27})-[works]->(:employer {name:'Dunder Mifflin'})"

  1. (empty list or set)
    1. Labels added: 2
    2. Nodes created: 3
    3. Properties set: 5
    4. Relationships created: 2
    5. "Query internal execution time: 0.350732 milliseconds"
      127.0.0.1:6379> graph.query a "MATCH (person)-[friends]->(p:person) RETURN p"
      1. "p.age"
      2. "p.name"
      1. "27.000000"
      2. "Pam"
      1. "NULL"
      2. "Dunder Mifflin"
    1. "Query internal execution time: 0.081449 milliseconds"
      127.0.0.1:6379> graph.query a "MATCH (person)-[works]->(e:employer) RETURN e"
      1. "e.name"
      1. "Pam"
      1. "Dunder Mifflin"
    1. "Query internal execution time: 0.079909 milliseconds"
      127.0.0.1:6379> graph.query a "MATCH (p:person)-[works]->(e:employer) RETURN p"
      1. "p.age"
      2. "p.name"
      1. "29.000000"
      2. "Jim"
      1. "27.000000"
      2. "Pam"
    1. "Query internal execution time: 0.105995 milliseconds"

Now for all three I did expect to only get one record that matches the label, and if you do the same in neo4j you get one record for each of the queries.

Improve scaling of bulk insert operation

The demo Python code demonstrating bulk insertion can generate unreasonable Redis queries when building sufficiently large graphs.

This task is to design and implement a batching/pipelining solution that allows for better demonstration of moderate-to-large graph creation.

Additionally, think about how the bulk insert logic can be made more friendly with respect to user knowledge of Node IDs and the order of operations with label and relationship creations.

Bug that kills redis

Had a typo in some test-code which crashed redis (rebuild image today just to be sure it wasnt fixed).
As you can see from the queries its just a typo on the node label

127.0.0.1:6379> graph.query graph:test "CREATE(:Test{a:'1',b:'2'})"

    1. Labels added: 1
    2. Nodes created: 1
    3. Properties set: 2
    4. "Query internal execution time: 0.120909 milliseconds"
      127.0.0.1:6379> graph.query graph:test "MATCH (t:Test) RETURN t"
    1. "t.b,t.a"
    2. "2,1"
    1. "Query internal execution time: 0.097027 milliseconds"
      127.0.0.1:6379> graph.query graph:test "MATCH (t:Tesr) RETURN t"
      Error: Server closed the connection
      (0.69s)
      127.0.0.1:6379>

Update documentation

Need to contact one of the technical writers.
Have RedisPlayground part of the documentation.

Crash on Merge

Recreation:

graph.QUERY social "CREATE ({name:'amit',age:30})"
graph.QUERY social "CREATE ({name:'roy',age:32})"
graph.QUERY social "MERGE ({ name: 'roy', age:32 })-[r:ACTED_IN]->({name:'amit',age:30})"
=== REDIS BUG REPORT START: Cut & paste starting from here ===
1:M 06 Aug 15:58:24.805 # Redis 4.0.10 crashed by signal: 11
1:M 06 Aug 15:58:24.805 # Crashed running the instruction at: 0x7f8b665b5676
1:M 06 Aug 15:58:24.805 # Accessing address: (nil)
1:M 06 Aug 15:58:24.805 # Failed assertion: <no assertion failed> (<no file>:0)

------ STACK TRACE ------
EIP:
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7f8b665b5676]

Backtrace:
redis-server *:6379(logStackTrace+0x37)[0x5646e09ebad7]
redis-server *:6379(sigsegvHandler+0xb0)[0x5646e09ec200]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f8b668e50c0]
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7f8b665b5676]
/lib/x86_64-linux-gnu/libc.so.6(__strdup+0xe)[0x7f8b665b53ae]
/usr/lib/redis/modules/redisgraph.so(New_AST_ConstantPredicateNode+0x40)[0x7f8b641e5900]

------ INFO OUTPUT ------
# Server
redis_version:4.0.10
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:5df2417984e896d3
redis_mode:standalone
os:Linux 4.15.0-29-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:1
run_id:0362dd3c4233b84028c58cffa455caf96e492277
tcp_port:6379
uptime_in_seconds:359
uptime_in_days:0
hz:10
lru_clock:6844448
executable:/data/redis-server
config_file:

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:572448
used_memory_human:559.03K
used_memory_rss:4866048
used_memory_rss_human:4.64M
used_memory_peak:572448
used_memory_peak_human:559.03K
used_memory_peak_perc:100.18%
used_memory_overhead:557790
used_memory_startup:508048
used_memory_dataset:14658
used_memory_dataset_perc:22.76%
total_system_memory:33242832896
total_system_memory_human:30.96G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:8.50
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:2
rdb_bgsave_in_progress:0
rdb_last_save_time:1533570745
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

# Stats
total_connections_received:1
total_commands_processed:3
instantaneous_ops_per_sec:0
total_net_input_bytes:265
total_net_output_bytes:10537
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

# Replication
role:master
connected_slaves:0
master_replid:0cb4573552041c84933ccc1ac20647ca479af25d
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.41
used_cpu_user:0.19
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Commandstats
cmdstat_command:calls=1,usec=1435,usec_per_call=1435.00
cmdstat_graph.QUERY:calls=2,usec=430,usec_per_call=215.00

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=2,expires=0,avg_ttl=0

------ CLIENT LIST OUTPUT ------
id=3 addr=172.17.0.1:54946 fd=8 name= age=356 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=graph.QUERY

------ CURRENT CLIENT INFO ------
id=3 addr=172.17.0.1:54946 fd=8 name= age=356 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=graph.QUERY
argv[0]: 'graph.QUERY'
argv[1]: 'social'
argv[2]: 'MERGE ({ name: 'roy', age:32 })-[r:ACTED_IN]->({name:'amit',age:30})'
1:M 06 Aug 15:58:24.809 # key 'social' found in DB containing the following object:
1:M 06 Aug 15:58:24.809 # Object type: 5
1:M 06 Aug 15:58:24.810 # Object encoding: 0
1:M 06 Aug 15:58:24.810 # Object refcount: 1

------ REGISTERS ------
1:M 06 Aug 15:58:24.810 # 
RAX:0000000000000000 RBX:00005646e1502860
RCX:0000000000000000 RDX:00005646e1502860
RDI:0000000000000000 RSI:0000000000000001
RBP:0000000000000000 RSP:00007ffe9ff8b978
R8 :00007f8b668ced48 R9 :0000000000000040
R10:0000000000000000 R11:00007f8b645a2740
R12:4040000000000000 R13:0000000000000007
R14:00005646e1501b40 R15:0000000000000000
RIP:00007f8b665b5676 EFL:0000000000010293
CSGSFS:002b000000000033
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b987) -> 00005646e1502800
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b986) -> 0000000000000000
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b985) -> 00005646e1502790
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b984) -> 00007f8b641d7d36
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b983) -> 000000000000000f
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b982) -> 00007ffe9ff8ba10
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b981) -> 00007ffe9ff8ba18
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b980) -> 00005646e1502740
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97f) -> 00005646e1502b70
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97e) -> 0000000000000000
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97d) -> 00005646e1502790
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97c) -> 00007f8b641e5900
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97b) -> 0000000000000040
1:M 06 Aug 15:58:24.810 # (00007ffe9ff8b97a) -> 00005646e1502860
1:M 06 Aug 15:58:24.811 # (00007ffe9ff8b979) -> 0000000000000003
1:M 06 Aug 15:58:24.811 # (00007ffe9ff8b978) -> 00007f8b665b53ae

------ FAST MEMORY TEST ------
1:M 06 Aug 15:58:24.811 # Bio thread for job type #0 terminated
1:M 06 Aug 15:58:24.811 # Bio thread for job type #1 terminated
1:M 06 Aug 15:58:24.811 # Bio thread for job type #2 terminated
*** Preparing to test memory region 5646e0cd7000 (98304 bytes)
*** Preparing to test memory region 5646e14f2000 (135168 bytes)
*** Preparing to test memory region 7f8b647fe000 (8388608 bytes)
*** Preparing to test memory region 7f8b64fff000 (8388608 bytes)
*** Preparing to test memory region 7f8b65800000 (12582912 bytes)
*** Preparing to test memory region 7f8b668d0000 (16384 bytes)
*** Preparing to test memory region 7f8b66aed000 (16384 bytes)
*** Preparing to test memory region 7f8b67133000 (4096 bytes)
*** Preparing to test memory region 7f8b67154000 (798720 bytes)
*** Preparing to test memory region 7f8b67219000 (12288 bytes)
*** Preparing to test memory region 7f8b6721e000 (4096 bytes)
.O.O.O.O.O.O.O.O.O.O.O
Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.

------ DUMPING CODE AROUND EIP ------
Symbol: strlen (base: 0x7f8b665b5650)
Module: /lib/x86_64-linux-gnu/libc.so.6 (base 0x7f8b66535000)
$ xxd -r -p /tmp/dump.hex /tmp/dump.bin
$ objdump --adjust-vma=0x7f8b665b5650 -D -b binary -m i386:x86-64 /tmp/dump.bin
------
1:M 06 Aug 15:58:24.971 # dump of function (hexdump of 166 bytes):
660fefc0660fefc9660fefd2660fefdb4889f84889f94881e1ff0f00004881f9cf0f0000776af30f6f20660f74e0660fd7d485d274040fbcc2c34883e0f0660f744810660f745020660f745830660fd7d166440fd7c2660fd7cb48c1e21048c1e1104c09c148c1e1204809ca4889f94831c14883e0c048d3fa4885d20f847e000000480fbcc2c3660f1f8400000000004883e0c0660f7400660f744810660f745020660f7458

=== REDIS BUG REPORT END. Make sure to include from START to END. ===

       Please report the crash by opening an issue on github:

           http://github.com/antirez/redis/issues

  Suspect RAM error? Use redis-server --test-memory to verify it.

Support * in MATCH

We are planning to get the subtree from a particular node and found that it was possible in CQL and thought it was possible in RedisGraph too as it supports CPL. But it seems to fail when used vis redis-cli. Can this be added soon as I am doing a POC for a huge client.

unable to load redis-graph module on redis4.0.11 on CentOS 6.8(Final)

Error:
Module /opt/redis/redis-graph/src/redisgraph.so failed to load: /opt/redis/redis-graph/src/redisgraph.so: undefined symbol: clock_gettime

Steps performed:

  1. Upgrade gcc to gcc4.9.x
  2. export LDFLAGS=-lrt
  3. make redis-graph
  4. make redis4.0.11
  5. redis-server --loadmodule /opt/redis/redis-graph/src/redisgraph.so

A query with where and not equal (!=), crashes the server

I modified the first query in the imdb demo to exclude the actor provided as input:
MATCH (n:actor{name:"Nicolas Cage"})-[:act]->(m:movie)<-[:act]-(a:actor)
where n.name != a.name
RETURN a.name, m.title

The server crashed when runnng this query.
Here's the console output:

redis-server: /home/ubuntu/redis-4.0-rc3/src/modules/redis-graph/src/filter_tree/filter_tree.c:300: _applyFilter: Assertion `0' failed.
Aborted (core dumped)

multi occurrence of entity

Be it in a multi-pattern query of a single pattern
(a)-[R0]->(b)-[R1]->(a)

Performing R0*R1 doesn't give the desired answer, as 'a' is bounded! need an equivalent to "expand-into" operation.

Redis crash if graph cant create a sub-key

Easy way to recreate this is if you already have a sub-key with the same name structure or create a graph and remove the main key and then try and create the graph again.

127.0.0.1:6379> graph.query graph "CREATE (c:country)"
1) (empty list or set)
2) 1) Labels added: 1
   2) Nodes created: 1
   3) "Query internal execution time: 0.456493 milliseconds"

127.0.0.1:6379> keys *
1) "redis_graph_store_graph_NODE_country"
2) "graph"
3) "redis_graph_store_graph_NODE_ALL"

127.0.0.1:6379> del graph
(integer) 1

127.0.0.1:6379> graph.query graph "CREATE (c:country)"
Error: Server closed the connection
(0.74s)

127.0.0.1:6379>

And as a way of convenience it would be nice to be able to do graph.delete key.

Extra newline on some error outputs seems to make lettuce wait for more input.

127.0.0.1:6379> graph.query a "MATCH (c:Country) RETURN c"
(error) key doesn't contains a graph object.
127.0.0.1:6379>

Above works as expected when asking lettuce to parse it as byte[] or List
But some erroneous commands produces an extra newline which seems(havent debugged it yet) to make lettuce wait for more data, for example this line

127.0.0.1:6379> graph.query a "MATCH (c:Country) RETURN "
(error) Syntax error at offset 27 near '
'

127.0.0.1:6379>

Will make it seemingly block for more data, I imagine it is supposed to be just one newline like the first example.

A minor detail on the first error-line, it should probably ready "(error) key doesn't contain a graph object", singular rather than plural.

Make sort direction specific to each ORDER BY property

Currently, all properties listed in an ORDER clause are affected by the same ascending or descending directive. This should be modified so that each property can have its own sort order:
MATCH (p:product) RETURN p ORDER BY p.numSold asc, p.cost desc

OpenCypher support question

Hello,

congrats on you good work, I think redisgraph has a huge potential!
I want to experiment with redisgraph to find common customer attributes. Let's say we have the following graph schema:
Nodes: Customer, Password, Name
Links: has_name, has_password
The goal of the task can be to "Count all unique names for customers using given password"
Here is the script to create the graph via redis-cli. Redis version Redis 4.0.9, redisgraph pulled on 18.5.2018
//nodes
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:1});"
GRAPH.QUERY passmate "CREATE (:Password{password:'same password'});"
GRAPH.QUERY passmate "CREATE (:Name{first:'George', last:'Johnson'})"
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:2});"
GRAPH.QUERY passmate "CREATE (:Name{first:'Jane', last:'Parker'})"
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:3});"
GRAPH.QUERY passmate "CREATE (:Password{password:'unique password'});"
GRAPH.QUERY passmate "CREATE (:Name{first:'David', last:'Evans'});"
//links
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 1 AND b.password = 'same password' CREATE (a)-[r:has_password { timestamp:'11-08-2012' }]->(b);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 2 AND b.password = 'same password' CREATE (a)-[r:has_password { timestamp:'30-08-2012' }]->(b);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 3 AND b.password = 'unique password' CREATE (a)-[r:has_password { timestamp:'30-08-2012' }]->(b);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 1 AND b.first = 'George' AND b.last = 'Johnson' CREATE (a)-[r:has_name { timestamp:'10-08-2012' }]->(b);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 2 AND b.first = 'Jane' AND b.last = 'Parker' CREATE (a)-[r:has_name { timestamp:'30-08-2012' }]->(b)"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 3 AND b.first = 'David' AND b.last = 'Evans' CREATE (a)-[r:has_name { timestamp:'20-08-2012' }]->(b);"

Now, data structure is: Name<-[has_name]-Customer-[has_password]->Password
We ask for the count of all unique names with "same password" with:

GRAPH.QUERY passmate "MATCH (n:Name)<-[:name]-(c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN distinct count(n)"

Result:
127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)<-[:has_name]-(c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN count(n)"

    1. "count(n)\x00"
    2. "3.000000"

Here are some more queries and results for more information:
127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN p"

    1. "p.password\x00"
    2. "same password"
    3. "same password"
    1. "Query internal execution time: 0.122000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)<-[:has_name]-(c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN p"
    1. "p.password\x00"
    2. "same password"
    3. "same password"
    4. "same password"
    1. "Query internal execution time: 0.113000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)<-[:has_name]-(c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN count(n)"
    1. "count(n)\x00"
    2. "3.000000"
    1. "Query internal execution time: 0.172000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)<-[:has_name]-(c:Customer)-[:has_password]->(p:Password{password:'any password'}) RETURN count(n)"
    1. "count(n)\x00"
    2. "3.000000"
    1. "Query internal execution time: 0.170000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)<-[:has_name]-(c:Customer)-[:has_password]->(p:Password{password:'any password'}) RETURN p"
    1. "p.password\x00"
    2. "any password"
    3. "any password"
    4. "any password"
    1. "Query internal execution time: 0.127000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (c:Customer)-[:has_password]->(p:Password{password:'any password'}) RETURN c,p"
    1. "c.email,c.id,p.password\x00"
    1. "Query internal execution time: 0.134000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (c:Customer)-[:has_password]->(p:Password{password:'same password'}) RETURN c,p"
    1. "c.email,c.id,p.password\x00"
    2. "[email protected],1.000000,same password"
    3. "[email protected],2.000000,same password"
    1. "Query internal execution time: 0.133000 milliseconds"

But if we make the link in the other direction, from password to customer and name to customer(similar to country visitor example in your docs) i.e : Name-[has_name]->Customer<-[has_password]-Password
//the same nodes
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:1});"
GRAPH.QUERY passmate "CREATE (:Password{password:'same password'});"
GRAPH.QUERY passmate "CREATE (:Name{first:'George', last:'Johnson'})"
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:2});"
GRAPH.QUERY passmate "CREATE (:Name{first:'Jane', last:'Parker'})"
GRAPH.QUERY passmate "CREATE (:Customer{email:'[email protected]', id:3});"
GRAPH.QUERY passmate "CREATE (:Password{password:'unique password'});"
GRAPH.QUERY passmate "CREATE (:Name{first:'David', last:'Evans'});"
//same links, BUT link other way arround
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 1 AND b.password = 'same password' CREATE (b)-[r:has_password { timestamp:'11-08-2012' }]->(a);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 2 AND b.password = 'same password' CREATE (b)-[r:has_password { timestamp:'30-08-2012' }]->(a);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Password) WHERE a.id = 3 AND b.password = 'unique password' CREATE (b)-[r:has_password { timestamp:'30-08-2012' }]->(a);"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 1 AND b.first = 'George' AND b.last = 'Johnson' CREATE (b)-[r:has_name { timestamp:'10-08-2012' }]->(a) ;"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 2 AND b.first = 'Jane' AND b.last = 'Parker' CREATE (b)-[r:has_name { timestamp:'30-08-2012' }]->(a)"
GRAPH.QUERY passmate "MATCH (a:Customer),(b:Name) WHERE a.id = 3 AND b.first = 'David' AND b.last = 'Evans' CREATE (b)-[r:has_name { timestamp:'20-08-2012' }]->(a);"

Again, if we ask for unique names count with "same password"

GRAPH.QUERY passmate "MATCH (n:Name)-[:has_name]->(c:Customer)<-[:has_password]-(p:Password{password:'same password'}) RETURN count(n)"

we got the following result:

127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)-[:has_name]->(c:Customer)<-[:has_password]-(p:Password{password:'same password'}) RETURN count(n)"

    1. "count(n)\x00"
    2. "1.000000"
    3. "1.000000"
    1. "Query internal execution time: 0.166000 milliseconds"
      127.0.0.1:6379>
      Here are some more queries and results for this particular case:
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)-[:has_name]->(c:Customer)<-[:has_password]-(p:Password{password:'same password'}) RETURN n,p"
    1. "n.first,n.last,p.password\x00"
    2. "George,Johnson,same password"
    3. "Jane,Parker,same password"
    1. "Query internal execution time: 0.165000 milliseconds"
      127.0.0.1:6379> GRAPH.QUERY passmate "MATCH (n:Name)-[:has_name]->(c:Customer)<-[r:has_password]-(p:Password{password:'same password'}) RETURN n,r,p"
    1. "n.first,n.last,r.timestamp,p.password\x00"
    2. "George,Johnson,11-08-2012,same password"
    3. "Jane,Parker,30-08-2012,same password"
    1. "Query internal execution time: 0.281000 milliseconds"

So in the second link implementation Name-[has_name]->Customer<-[has_password]-Password, query returns correct result, except for the fact that count should return only one row.
In the first link type, password does not seem to be really linked to Customer.
Questions:
1)Do you think Name<-[has_name]-Customer-[has_password]->Password should return the same result as Name-[has_name]->Customer<-[has_password]-Password , with the appropriate query?
2)Can count return always one row (in the first case returns one, but in the second returns 2 with value 1)? Since, if we count 200 nodes, 200 lines will be returned and more data will be returned and used.

Thanks you,
Stanka

OpenCypher language coverage test

I've included the feature files, make test will run TCK, but most of the scenarios are skipped as we don't support every feature of the language, thus this is going to be an ongoing task of enabling additional scenarios.

Segfault on node deletion

Delete operations on nodes are segfaulting for me fairly consistently when valid nodes into the positions of deleted ones.

127.0.0.1:6379> GRAPH.QUERY imdb "MATCH (a:actor) WHERE a.age < 30 DELETE a"


=== REDIS BUG REPORT START: Cut & paste starting from here ===
11397:M 08 Aug 13:40:38.813 # Redis 999.999.999 crashed by signal: 11
11397:M 08 Aug 13:40:38.813 # Crashed running the instruction at: 0x7f8397bb3b72
11397:M 08 Aug 13:40:38.813 # Accessing address: 0x13fd314
11397:M 08 Aug 13:40:38.813 # Failed assertion: <no assertion failed> (<no file>:0)

------ STACK TRACE ------
EIP:
/home/laptop-linux/dev/redis/graph/src/redisgraph.so(Graph_DeleteNodes+0x170)[0x7f8397bb3b72]

Backtrace:
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(logStackTrace+0x45)[0x46c925]
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(sigsegvHandler+0xb9)[0x46d0e9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f839a6d3390]
/home/laptop-linux/dev/redis/graph/src/redisgraph.so(Graph_DeleteNodes+0x170)[0x7f8397bb3b72]

From GDB:

Thread 1 "redis-server" received signal SIGSEGV, Segmentation fault.
0x00007f8397bb3b72 in Graph_DeleteNodes (g=0x1081b20, IDs=0xeacd50, IDCount=167)
    at /home/laptop-linux/dev/redis/graph/src/graph/graph.c:268
268                 replacements[j].nodeID = id;
(gdb) bt
#0  0x00007f8397bb3b72 in Graph_DeleteNodes (g=0x1081b20, IDs=0xeacd50, IDCount=167)
    at /home/laptop-linux/dev/redis/graph/src/graph/graph.c:268
#1  0x00007f8397ba658b in _DeleteEntities (op=0x139d6b0)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op_delete.c:101
#2  0x00007f8397ba6777 in OpDeleteFree (ctx=0x139d6b0)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op_delete.c:139
#3  0x00007f8397bac567 in OpBase_Free (op=0x139d6b0)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op.c:19
#4  0x00007f8397b9e786 in _ExecutionPlanFreeRecursive (op=0x139d6b0)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/execution_plan.c:466
#5  0x00007f8397b9e7a4 in ExecutionPlanFree (plan=0xf00eb0)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/execution_plan.c:470
#6  0x00007f8397b90b25 in MGraph_Query (ctx=0x7ffefe6b2830, argv=0x7f8399aa41d0, argc=3)
    at /home/laptop-linux/dev/redis/graph/src/module.c:114
#7  0x0000000000496c1f in RedisModuleCommandDispatcher (c=<optimized out>) at module.c:466
#8  0x000000000042c5c6 in call (c=c@entry=0x7f8399b5d6c0, flags=flags@entry=15) at server.c:2244
#9  0x000000000042ccc7 in processCommand (c=0x7f8399b5d6c0) at server.c:2526
#10 0x000000000043cb45 in processInputBuffer (c=0x7f8399b5d6c0) at networking.c:1369
#11 0x00000000004263de in aeProcessEvents (eventLoop=eventLoop@entry=0x7f8399a36050, flags=flags@entry=11)
    at ae.c:421
#12 0x000000000042680b in aeMain (eventLoop=0x7f8399a36050) at ae.c:464
#13 0x0000000000423386 in main (argc=<optimized out>, argv=0x7ffefe6b2b48) at server.c:3914
(gdb) p j
$1 = 7739

Additionally, a similar query that crashes in a slightly different spot:

127.0.0.1:6379> GRAPH.QUERY imdb "MATCH (a:actor) WHERE a.age = 50 DELETE a"                                                                                                                                                          
                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                      
=== REDIS BUG REPORT START: Cut & paste starting from here ===                                                                                                                                                                        
11925:M 08 Aug 13:44:10.890 # Redis 999.999.999 crashed by signal: 11                                                                                                                                                                 
11925:M 08 Aug 13:44:10.890 # Crashed running the instruction at: 0x7f07b47b3072                                                                                                                                                      
11925:M 08 Aug 13:44:10.890 # Accessing address: 0xf6f108                                                                                                                                                                             
11925:M 08 Aug 13:44:10.890 # Failed assertion: <no assertion failed> (<no file>:0)                                                                                                                                                   
                                                                                                                                                                                                                                      
------ STACK TRACE ------                                                                                                                                                                                                             
EIP:                                                                                                                                                                                                                                  
/home/laptop-linux/dev/redis/graph/src/redisgraph.so(_Graph_NodeBlockMigrateNode+0x87)[0x7f07b47b3072]                                                                                                                                
                                                                                                                                                                                                                                      
Backtrace:                                                                                                                                                                                                                            
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(logStackTrace+0x45)[0x46c925]                                                                                                                                 
/home/laptop-linux/dev/redis/redis-base/src/redis-server 127.0.0.1:6379(sigsegvHandler+0xb9)[0x46d0e9]                                                                                                                                
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f07b71e3390]                                                                                                                                                                       
/home/laptop-linux/dev/redis/graph/src/redisgraph.so(_Graph_NodeBlockMigrateNode+0x87)[0x7f07b47b3072]      
Thread 1 "redis-server" received signal SIGSEGV, Segmentation fault.
0x00007f07b47b3072 in _Graph_NodeBlockMigrateNode (g=0xb831e0, src=1592, dest=10829696)
    at /home/laptop-linux/dev/redis/graph/src/graph/graph.c:86
86          destNodeBlock->nodes[destNodeBlockIdx] = *srcNode;
(gdb) bt
#0  0x00007f07b47b3072 in _Graph_NodeBlockMigrateNode (g=0xb831e0, src=1592, dest=10829696)
    at /home/laptop-linux/dev/redis/graph/src/graph/graph.c:86
#1  0x00007f07b47b3cb0 in Graph_DeleteNodes (g=0xb831e0, IDs=0xe9bbc0, IDCount=35)
    at /home/laptop-linux/dev/redis/graph/src/graph/graph.c:291
#2  0x00007f07b47a658b in _DeleteEntities (op=0xe9be20)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op_delete.c:101
#3  0x00007f07b47a6777 in OpDeleteFree (ctx=0xe9be20)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op_delete.c:139
#4  0x00007f07b47ac567 in OpBase_Free (op=0xe9be20)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/ops/op.c:19
#5  0x00007f07b479e786 in _ExecutionPlanFreeRecursive (op=0xe9be20)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/execution_plan.c:466
#6  0x00007f07b479e7a4 in ExecutionPlanFree (plan=0xb3bd60)
    at /home/laptop-linux/dev/redis/graph/src/execution_plan/execution_plan.c:470
#7  0x00007f07b4790b25 in MGraph_Query (ctx=0x7ffd55e12e30, argv=0x7f07b66a40b0, argc=3)
    at /home/laptop-linux/dev/redis/graph/src/module.c:114
#8  0x0000000000496c1f in RedisModuleCommandDispatcher (c=<optimized out>) at module.c:466
#9  0x000000000042c5c6 in call (c=c@entry=0x7f07b675ddc0, flags=flags@entry=15) at server.c:2244
#10 0x000000000042ccc7 in processCommand (c=0x7f07b675ddc0) at server.c:2526
#11 0x000000000043cb45 in processInputBuffer (c=0x7f07b675ddc0) at networking.c:1369
#12 0x00000000004263de in aeProcessEvents (eventLoop=eventLoop@entry=0x7f07b6636050, flags=flags@entry=11)
    at ae.c:421
#13 0x000000000042680b in aeMain (eventLoop=0x7f07b6636050) at ae.c:464
#14 0x0000000000423386 in main (argc=<optimized out>, argv=0x7ffd55e13148) at server.c:3914

I think it would be worthwhile to simplify the logic around deletes, specifically by sorting the nodes by ID (we discussed this a bit in PR #25).

I'm going to assign it to myself for the moment, but let me know if you anticipate roadblocks or see other options!

Delete entities

Enable entities deletion, ,might require introduction on GC.

Crash when returning undefined variable

GRAPH.QUERY a "MATCH (a)-[]->(c) RETURN a,c,r"
=== REDIS BUG REPORT START: Cut & paste starting from here ===
1:M 23 Aug 08:21:30.297 # Redis 4.0.11 crashed by signal: 11
1:M 23 Aug 08:21:30.297 # Crashed running the instruction at: 0x7f583a80b676
1:M 23 Aug 08:21:30.297 # Accessing address: (nil)
1:M 23 Aug 08:21:30.298 # Failed assertion: <no assertion failed> (<no file>:0)

------ STACK TRACE ------
EIP:
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7f583a80b676]

Backtrace:
redis-server *:6379(logStackTrace+0x37)[0x563ab52b6c97]
redis-server *:6379(sigsegvHandler+0xb0)[0x563ab52b73c0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f583ab3b0c0]
/lib/x86_64-linux-gnu/libc.so.6(strlen+0x26)[0x7f583a80b676]
/usr/lib/redis/modules/redisgraph.so(AR_EXP_GetAliases+0x71)[0x7f58383eae41]

------ INFO OUTPUT ------
# Server
redis_version:4.0.11
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:74253224a862200c
redis_mode:standalone
os:Linux 4.15.0-32-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:1
run_id:9ae304c520cfa6a13df4a25f6a96d9f66420437a
tcp_port:6379
uptime_in_seconds:22
uptime_in_days:0
hz:10
lru_clock:8285834
executable:/data/redis-server
config_file:

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:1

# Memory
used_memory:700720
used_memory_human:684.30K
used_memory_rss:4648960
used_memory_rss_human:4.43M
used_memory_peak:700720
used_memory_peak_human:684.30K
used_memory_peak_perc:106.51%
used_memory_overhead:557982
used_memory_startup:508048
used_memory_dataset:142738
used_memory_dataset_perc:74.08%
total_system_memory:33242828800
total_system_memory_human:30.96G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:6.63
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:1
rdb_bgsave_in_progress:0
rdb_last_save_time:1535012468
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

# Stats
total_connections_received:1
total_commands_processed:5
instantaneous_ops_per_sec:0
total_net_input_bytes:511
total_net_output_bytes:639
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

# Replication
role:master
connected_slaves:0
master_replid:d8c4a8121fe3ef35d3a39b72a19991c0662f9224
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.04
used_cpu_user:0.04
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Commandstats
cmdstat_graph.QUERY:calls=5,usec=514,usec_per_call=102.80

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=6,expires=0,avg_ttl=0

------ CLIENT LIST OUTPUT ------
id=3 addr=172.17.0.1:38292 fd=8 name= age=18 idle=0 flags=b db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=graph.QUERY

------ REGISTERS ------
1:M 23 Aug 08:21:30.300 # 
RAX:0000000000000000 RBX:0000000000000000
RCX:0000000000000000 RDX:0000000000000008
RDI:0000000000000000 RSI:00007f5830000b20
RBP:0000563ab601e830 RSP:00007f583836ac28
R8 :0000000000000000 R9 :0000000000000000
R10:0000000000000020 R11:0000000000000001
R12:00007f5830000b20 R13:0000000000000003
R14:00007f583836ac78 R15:00007f583836ad40
RIP:00007f583a80b676 EFL:0000000000010293
CSGSFS:002b000000000033
1:M 23 Aug 08:21:30.300 # (00007f583836ac37) -> 0000000000000001
1:M 23 Aug 08:21:30.300 # (00007f583836ac36) -> 00007f5835a2402b
1:M 23 Aug 08:21:30.300 # (00007f583836ac35) -> 0000563ab601eb20
1:M 23 Aug 08:21:30.300 # (00007f583836ac34) -> 00007f5830000b20
1:M 23 Aug 08:21:30.300 # (00007f583836ac33) -> 0000563ab601eb20
1:M 23 Aug 08:21:30.300 # (00007f583836ac32) -> 0000563ab601e880
1:M 23 Aug 08:21:30.300 # (00007f583836ac31) -> 00007f583836ad40
1:M 23 Aug 08:21:30.300 # (00007f583836ac30) -> 00007f58383e99b4
1:M 23 Aug 08:21:30.300 # (00007f583836ac2f) -> 0000000000000003
1:M 23 Aug 08:21:30.300 # (00007f583836ac2e) -> 00007f5830000b20
1:M 23 Aug 08:21:30.301 # (00007f583836ac2d) -> 0000563ab601e8d0
1:M 23 Aug 08:21:30.301 # (00007f583836ac2c) -> 0000000000000001
1:M 23 Aug 08:21:30.301 # (00007f583836ac2b) -> 0000000000000000
1:M 23 Aug 08:21:30.301 # (00007f583836ac2a) -> 00007f58387a1030
1:M 23 Aug 08:21:30.301 # (00007f583836ac29) -> 00007f5830000980
1:M 23 Aug 08:21:30.301 # (00007f583836ac28) -> 00007f58383eae41

------ FAST MEMORY TEST ------
1:M 23 Aug 08:21:30.301 # Bio thread for job type #0 terminated
1:M 23 Aug 08:21:30.301 # Bio thread for job type #1 terminated
1:M 23 Aug 08:21:30.301 # Bio thread for job type #2 terminated
*** Preparing to test memory region 563ab55a2000 (98304 bytes)
*** Preparing to test memory region 563ab600e000 (135168 bytes)
*** Preparing to test memory region 7f5820000000 (135168 bytes)
*** Preparing to test memory region 7f5828000000 (135168 bytes)
*** Preparing to test memory region 7f582c000000 (135168 bytes)
*** Preparing to test memory region 7f5830000000 (135168 bytes)
*** Preparing to test memory region 7f5835a00000 (8388608 bytes)
*** Preparing to test memory region 7f5836369000 (8388608 bytes)
*** Preparing to test memory region 7f5836b6a000 (8388608 bytes)
*** Preparing to test memory region 7f583736b000 (8388608 bytes)
*** Preparing to test memory region 7f5837b6c000 (8388608 bytes)
*** Preparing to test memory region 7f58389fe000 (8388608 bytes)
*** Preparing to test memory region 7f58391ff000 (8388608 bytes)
*** Preparing to test memory region 7f5839a00000 (12582912 bytes)
*** Preparing to test memory region 7f583ab26000 (16384 bytes)
*** Preparing to test memory region 7f583ad43000 (16384 bytes)
*** Preparing to test memory region 7f583b326000 (4096 bytes)
*** Preparing to test memory region 7f583b347000 (4096 bytes)
*** Preparing to test memory region 7f583b368000 (4096 bytes)
*** Preparing to test memory region 7f583b3aa000 (798720 bytes)
*** Preparing to test memory region 7f583b46f000 (12288 bytes)
*** Preparing to test memory region 7f583b474000 (4096 bytes)

Crash on AR_EXP_NewOpNode

graph.QUERY social "MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie) WHERE movie.title='a' RETURN movie.title AS title, collect(actor.name) AS cast ORDER BY title ASC LIMIT 10"
redis-server: /redisgraph/src/arithmetic/arithmetic_expression.c:136: AR_EXP_NewOpNode: Assertion `agg_func != NULL' failed.


=== REDIS BUG REPORT START: Cut & paste starting from here ===
1:M 06 Aug 16:26:15.414 # Redis 4.0.10 crashed by signal: 11
1:M 06 Aug 16:26:15.414 # Crashed running the instruction at: 0x7f34a1d5a529
1:M 06 Aug 16:26:15.414 # Accessing address: (nil)
1:M 06 Aug 16:26:15.414 # Failed assertion: <no assertion failed> (<no file>:0)

------ STACK TRACE ------
EIP:
/lib/x86_64-linux-gnu/libc.so.6(abort+0x269)[0x7f34a1d5a529]

Backtrace:
redis-server *:6379(logStackTrace+0x37)[0x5631fb98ead7]
redis-server *:6379(sigsegvHandler+0xb0)[0x5631fb98f200]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f34a20d60c0]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x269)[0x7f34a1d5a529]
/lib/x86_64-linux-gnu/libc.so.6(+0x2be67)[0x7f34a1d51e67]
/lib/x86_64-linux-gnu/libc.so.6(+0x2bf12)[0x7f34a1d51f12]
/usr/lib/redis/modules/redisgraph.so(+0x7280c)[0x7f349f9db80c]

------ INFO OUTPUT ------
# Server
redis_version:4.0.10
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:5df2417984e896d3
redis_mode:standalone
os:Linux 4.15.0-29-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:1
run_id:74fac0e30b4e8228dec002fa856bbf6f01476836
tcp_port:6379
uptime_in_seconds:68
uptime_in_days:0
hz:10
lru_clock:6846119
executable:/data/redis-server
config_file:

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:572528
used_memory_human:559.11K
used_memory_rss:4993024
used_memory_rss_human:4.76M
used_memory_peak:572528
used_memory_peak_human:559.11K
used_memory_peak_perc:100.20%
used_memory_overhead:557790
used_memory_startup:508048
used_memory_dataset:14738
used_memory_dataset_perc:22.86%
total_system_memory:33242832896
total_system_memory_human:30.96G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:8.72
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:1
rdb_bgsave_in_progress:0
rdb_last_save_time:1533572707
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0

# Stats
total_connections_received:1
total_commands_processed:4
instantaneous_ops_per_sec:0
total_net_input_bytes:572
total_net_output_bytes:10538
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0

# Replication
role:master
connected_slaves:0
master_replid:4960e868347490a6b2d2983b44472cf769e229b5
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.10
used_cpu_user:0.08
used_cpu_sys_children:0.00
used_cpu_user_children:0.01

# Commandstats
cmdstat_graph.QUERY:calls=3,usec=456,usec_per_call=152.00
cmdstat_command:calls=1,usec=929,usec_per_call=929.00

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=2,expires=0,avg_ttl=0

------ CLIENT LIST OUTPUT ------
id=3 addr=172.17.0.1:55850 fd=8 name= age=64 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=graph.QUERY

------ CURRENT CLIENT INFO ------
id=3 addr=172.17.0.1:55850 fd=8 name= age=64 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=graph.QUERY
argv[0]: 'graph.QUERY'
argv[1]: 'social'
argv[2]: 'MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie) WHERE movie.title='a' RETURN movie.title AS title, collect(actor.name) AS cast ORDER BY title ASC LIMIT 10'
1:M 06 Aug 16:26:15.418 # key 'social' found in DB containing the following object:
1:M 06 Aug 16:26:15.418 # Object type: 5
1:M 06 Aug 16:26:15.418 # Object encoding: 0
1:M 06 Aug 16:26:15.418 # Object refcount: 1

------ REGISTERS ------
1:M 06 Aug 16:26:15.418 # 
RAX:0000000000000006 RBX:00007f34a2a09000
RCX:00007f34a1d58fff RDX:0000000000000000
RDI:0000000000000002 RSI:00007ffca89cc020
RBP:00007f349fd9f1d8 RSP:00007ffca89cc130
R8 :0000000000000000 R9 :00007ffca89cc020
R10:0000000000000008 R11:0000000000000246
R12:0000000000000088 R13:00007f349fd9f320
R14:0000000000000000 R15:00005631fcc76400
RIP:00007f34a1d5a529 EFL:0000000000010246
CSGSFS:002b000000000033
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13f) -> 0000000000000000
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13e) -> 0000000000000000
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13d) -> 0000000000000000
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13c) -> 0000000000000000
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13b) -> 0000000000000000
1:M 06 Aug 16:26:15.418 # (00007ffca89cc13a) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc139) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc138) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc137) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc136) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc135) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc134) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc133) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc132) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc131) -> 0000000000000000
1:M 06 Aug 16:26:15.419 # (00007ffca89cc130) -> 0000000000000020

------ FAST MEMORY TEST ------
1:M 06 Aug 16:26:15.420 # Bio thread for job type #0 terminated
1:M 06 Aug 16:26:15.420 # Bio thread for job type #1 terminated
1:M 06 Aug 16:26:15.420 # Bio thread for job type #2 terminated
*** Preparing to test memory region 5631fbc7a000 (98304 bytes)
*** Preparing to test memory region 5631fcc63000 (135168 bytes)
*** Preparing to test memory region 7f349fffe000 (8388608 bytes)
*** Preparing to test memory region 7f34a07ff000 (8388608 bytes)
*** Preparing to test memory region 7f34a1000000 (12582912 bytes)
*** Preparing to test memory region 7f34a20c1000 (16384 bytes)
*** Preparing to test memory region 7f34a22de000 (16384 bytes)
*** Preparing to test memory region 7f34a2924000 (4096 bytes)
*** Preparing to test memory region 7f34a2945000 (798720 bytes)
*** Preparing to test memory region 7f34a2a09000 (16384 bytes)
*** Preparing to test memory region 7f34a2a0f000 (4096 bytes)
.O.O.O.O.O.O.O.O.O.O.O
Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.

------ DUMPING CODE AROUND EIP ------
Symbol: abort (base: 0x7f34a1d5a2c0)
Module: /lib/x86_64-linux-gnu/libc.so.6 (base 0x7f34a1d26000)
$ xxd -r -p /tmp/dump.hex /tmp/dump.bin
$ objdump --adjust-vma=0x7f34a1d5a2c0 -D -b binary -m i386:x86-64 /tmp/dump.bin
------
1:M 06 Aug 16:26:15.541 # dump of function (hexdump of 745 bytes):
4881ec2801000064488b142510000000483b15016936007446be0100000031c0833d19a4360000740cf00fb135df683600750beb230fb135d4683600741a488d3dcb6836004881ec80000000e85f0f0c004881c480000000488915b96836008b05bb6836008305a86836000185c0744383f801747783f8020f848e00000083f8030f844201000083f8040f849801000083f8050f84ad01000083f8060f84c701000083f8070f84bf0100000f1f440000f4ebfd31c0b9100000004889e7f348ab31d24889e6bf01000000c7054c6836000100000048c7042420000000e82fefffff8b053968360083f801758931ffc7052868360002000000e8730f04008b051d68360083f8020f8572ffffff832d0168360001c7050368360000000000754148c705ee67360000000000833d0fa3360000740bf0ff0dd6673600750aeb22ff0dcc673600741a488d3dc36736004881ec80000000e8870e0c004881c480000000bf06000000e806ebffff64488b142510000000483b159e6736007446be0100000031c0833db6a2360000740cf00fb1357c673600750beb230fb13571673600741a488d3d686736004881ec80000000e8fc0d0c004881c4800000004889155667360083054b67360001488d94248000000031c0b913000000c7053e673600040000004889d7488db280000000f348ab48c7c0ffffffff4889064883ee084839d675f431d2bf06000000c784240801000000000000e8c7edffff8b050167360083f8040f8568feffffc705ee66360005000000e839bd03008b05e366360083f8050f8553feffffbf06000000c705cb66360006000000e816eaffff8b05c066360083f8060f8539fefffff4bf7f000000c705a766360008000000e8a24008006690415741564155415455534883ec184885d248893c24488974240874474989d54989cc4c89c54531f6eb11660f1f44000074464c8d73014d39ee73284b8d1c2e488b3c2448d1eb4989df4d0faffc4c037c24084c89feffd585c079d54989dd4d39ee72d84883c41831c0
Function at 0x7f34a1d592d0 is sigprocmask
Function at 0x7f34a1d58f30 is gsignal
Function at 0x7f34a1d592a0 is sigaction
Function at 0x7f34a1d96230 is fcloseall
Function at 0x7f34a1d58f30 is gsignal
Function at 0x7f34a1dde5e0 is _exit

=== REDIS BUG REPORT END. Make sure to include from START to END. ===

MATCH with property=NULL crashes redis

CREATE (:label{a:10,b:'abc'})

CREATE (:label{a:20,b:'cba',c:'c'})

MATCH (r:label) WHERE r.c=NULL RETURN r

Above crashes redis-graph server (running on docker on Mac).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.