【发布时间】:2021-11-09 15:34:15
【问题描述】:
按照here指定的指令编译RedisJson的源代码后,在project_root/target/release得到rejson.so文件,然后我输入这个命令 sudo redis-server --loadmodule /home/username/RedisJSON /target/release/rejson.so 加载 redis 模块。但是我收到了这个错误信息。
Server initialized
7666:M 14 Sep 2021 13:27:38.795 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
7666:M 14 Sep 2021 13:27:38.795 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
7666:M 14 Sep 2021 13:27:38.862 * <ReJSON> Exported RedisJSON_V1 API
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/redis-module-0.23.0/src/raw.rs:580:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted
请问如何解决这个问题?
【问题讨论】:
-
看起来和#175 是同一个问题(尽管没有任何回应,这无济于事);这两种情况都缺少与
RedisModule_ExportSharedAPI函数的绑定。
标签: linux rust redis rust-cargo redisjson