`` Hello Lua hackers. My question: I'm using the Lua C API, and i'm inside a Lua line hook. Now from there I can call lua_[p]call() without issues, however it creates a new callframe, so I'm no longer able to access the local vars in the context of the function where the hook was called. Is there a workaround?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM: DI0f0c644fd3ccb51c2cedbd47fcb6f312646c993c05a0SQ | |
TO: | |
Proposal 1: DI0f0c644f:d3ccb51c2cedbd47fcb6f312646c993c:05a0SQ (two ":" added) | |
Proposal 2: DId3ccb51c2cedbd47fcb6f312646c993c0f0c644f05a0SQ (Node and Message ID inverted) | |
Proposal 3: D[d3ccb51c2cedbd47fcb6f312646c993c]0f0c644f05a0Q (D and Q only for validity check, [] around Message ID) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/redis-cli.c b/src/redis-cli.c | |
index be37a91..82b8e04 100644 | |
--- a/src/redis-cli.c | |
+++ b/src/redis-cli.c | |
@@ -1263,8 +1263,9 @@ static int evalMode(int argc, char **argv) { | |
* Latency and latency history modes | |
*--------------------------------------------------------------------------- */ | |
-#define LATENCY_SAMPLE_RATE 10 /* milliseconds. */ | |
+#define LATENCY_SAMPLE_RATE 1 /* milliseconds. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Anonymous UUID: C34F1B4B-6A79-41F1-2DAB-DFAB6AD0208C | |
Fri Nov 27 16:31:05 2015 | |
*** Panic Report *** | |
panic(cpu 0 caller 0xffffff8018e1d81c): assertion failed: inp->inp_state != INPCB_STATE_DEAD, file: /Library/Caches/com.apple.xbs/Sources/xnu/xnu-3247.1.106/bsd/netinet/in_pcb.c, line: 2098 | |
Backtrace (CPU 0), Frame : Return Address | |
0xffffff81226535e0 : 0xffffff8018ae5357 | |
0xffffff8122653660 : 0xffffff8018e1d81c | |
0xffffff81226536c0 : 0xffffff8018e454cf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lua debugger> eval return {1,2,3} | |
<retval> {1; 2; 3} | |
lua debugger> eval return {x=5,y=10,1,2,3} | |
<retval> {1=1; 2=2; 3=3; "y"=10; "x"=5} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /tmp/script.lua :luarepl*: ?? | |
redis.call('get','foo'); | |
redis.replicate_commands(); | |
redis.call('set','foo',math.random()); | |
redis.call('set','bar',math.random()); | |
return redis.call('get','foo') | |
redis-cli --slave (in a different terminal) | |
redis-cli --eval /tmp/script.lua |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'redis' | |
r = Redis.new | |
item_id = 0 | |
r.pipelined { | |
5000000.times { | |
room = sprintf("%.4d",rand(1000)) | |
price = sprintf("%.2f",(rand(10000)/100.0)) | |
price = "0"+price if price.length < 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/redis-cli.c b/src/redis-cli.c | |
index 88f39a6..7524712 100644 | |
--- a/src/redis-cli.c | |
+++ b/src/redis-cli.c | |
@@ -1444,6 +1444,7 @@ static void pipeMode(void) { | |
redisReaderFeed(reader,ibuf,nread); | |
last_read_time = time(NULL); | |
} | |
+ printf("."); fflush(stdout); | |
} while(nread > 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
epoll_wait(3, {{EPOLLIN, {u32=7, u64=7}}, {EPOLLIN, {u32=8, u64=8}}, {EPOLLIN, {u32=9, u64=9}}, {EPOLLIN, {u32=10, u64=10}}, {EPOLLIN, {u32=11, u64=11}}, {EPOLLIN, {u32=12, u64=12}}, {EPOLLIN, {u32=13, u64=13}}, {EPOLLIN, {u32=14, u64=14}}, {EPOLLIN, {u32=15, u64=15}}, {EPOLLIN, {u32=16, u64=16}}, {EPOLLIN, {u32=17, u64=17}}, {EPOLLIN, {u32=18, u64=18}}, {EPOLLIN, {u32=19, u64=19}}, {EPOLLIN, {u32=20, u64=20}}, {EPOLLIN, {u32=21, u64=21}}, {EPOLLIN, {u32=22, u64=22}}, {EPOLLIN, {u32=23, u64=23}}, {EPOLLIN, {u32=24, u64=24}}, {EPOLLIN, {u32=25, u64=25}}, {EPOLLIN, {u32=26, u64=26}}, {EPOLLIN, {u32=27, u64=27}}, {EPOLLIN, {u32=28, u64=28}}, {EPOLLIN, {u32=29, u64=29}}, {EPOLLIN, {u32=30, u64=30}}, {EPOLLIN, {u32=31, u64=31}}, {EPOLLIN, {u32=32, u64=32}}, {EPOLLIN, {u32=33, u64=33}}, {EPOLLIN, {u32=34, u64=34}}, {EPOLLIN, {u32=35, u64=35}}, {EPOLLIN, {u32=36, u64=36}}, {EPOLLIN, {u32=37, u64=37}}, {EPOLLIN, {u32=38, u64=38}}, {EPOLLIN, {u32=39, u64=39}}, {EPOLLIN, {u32=40, u64=40}}, {EPOLLIN, {u32=41, u64=41}}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARN jepsen.core - Process 251 indeterminate | |
java.lang.IllegalArgumentException: Key must be integer | |
at clojure.lang.APersistentVector.assoc(APersistentVector.java:335) | |
at clojure.lang.APersistentVector.assoc(APersistentVector.java:18) | |
at clojure.lang.RT.assoc(RT.java:702) | |
at clojure.core$assoc.invoke(core.clj:187) | |
at jepsen.disque$dequeue_BANG_.invoke(disque.clj:200) | |
at jepsen.disque.Client.invoke_BANG_(disque.clj:225) | |
at jepsen.core$worker$fn__3132$fn__3133.invoke(core.clj:133) | |
at jepsen.core$worker$fn__3132.invoke(core.clj:131) |