03:15:33 GMT does redis offer a way for me to transactionally fetch a list length before inserting that value along with an element? Without the possibility for another command to run while that occurs? 06:27:19 GMT echologic: there's WATCH, but that can be interrupted. lua scripts (EVAL/etc) are executed atomically, so that's probably what you want 07:30:14 GMT minus: is there any data on how relatively slow that is compared to simply performing 2 Redis commands? i.e. does Lua script execution scale to thouands+ of executions per second? 07:52:39 GMT echologic: not that i know of; it's pretty easy to benchmark though 07:54:11 GMT echologic: take a look at RPOPLPUSH too, that's not directly what you asked for but might be an alternative solution 08:14:44 GMT echologic, i got about 6000 executions per second of a relatively complex lua script yesterday 08:15:31 GMT minus: thanks! 08:16:25 GMT Habbie: cool! All I really want to do is append an `id` to an element before it's inserted into the list, and ensure the index of the element's position is matched up with its ID (thus the need for it to be atomic), so I guess that can't be too strenuous! 08:16:34 GMT echologic, indeed 08:16:55 GMT it's a pity you can't do custom commands with redis-benchmark 08:42:59 GMT Habbie: sure you can 08:43:09 GMT you can execute whatever command you want, including EVAL 08:43:19 GMT badboy_, did i misread? can you tell me how? 08:43:36 GMT redis-benchmark eval 'return redis.call("ping")' 0 08:43:49 GMT ah! 08:43:52 GMT i see it in the examples 08:43:54 GMT ;) 08:43:55 GMT it's not in the synopsis 08:44:05 GMT synopsis? 08:44:52 GMT redis-benchmark -h 08:44:54 GMT Invalid option "-h" or option argument missing 08:44:56 GMT Usage: redis-benchmark [-h ] [-p ] [-c ] [-n [-k ] 08:44:58 GMT that last line 08:45:01 GMT redis-benchmark --help 08:45:21 GMT but yeah, it's not mentioned in any way in the usage line 08:45:26 GMT that 08:45:30 GMT so that's how i missed it 08:45:32 GMT thanks! 08:45:35 GMT PRs welcome^^ 08:45:45 GMT sure thing 08:45:48 GMT already have one or two open :) 08:45:59 GMT :/ 08:46:02 GMT hm? 08:46:07 GMT yes, two 08:46:14 GMT sadly it often takes a long time to get these merged... 08:46:18 GMT that i saw 08:46:21 GMT and there's nothing I can do about it 08:46:33 GMT wonder if it would help if PRs got automated testing 08:46:37 GMT to at least weed some out 08:46:44 GMT or conversely, give the maintainer some confidence before starting a review 08:47:12 GMT if only someone would listen to me :P 08:47:16 GMT echologic, 7000-15000 per second depending on complexity of script 08:47:45 GMT and machine 08:47:56 GMT a eval ping does about 150k on my laptop ;) 08:48:06 GMT of course 08:48:12 GMT 'eval ping'? 08:48:40 GMT eval 'return redis.call("ping")' 0 08:49:01 GMT 23k 08:49:45 GMT oh wow 08:49:56 GMT 60k from 3.2.5 08:49:58 GMT the 23k is git 08:50:27 GMT simple script now 10k on 3.2.5 08:50:36 GMT .. with monitor on 08:53:48 GMT Habbie: it looks like ioredis is a bit better at lua script handling than node_redis is. 08:54:06 GMT oh? 08:54:13 GMT maybe one uses evalsha and the other doesn't? 08:56:58 GMT the only references I can find to lua script support for node_redis is in the github issues... 08:57:06 GMT ioredis has it documented on the main page. 10:40:50 GMT hello 10:41:19 GMT for some config mishap our server sshd service has died 10:41:33 GMT the only way we can connect is now using redis-cli 10:41:41 GMT we are able to go to the redis-cli of the server 10:42:00 GMT is it anyway possible to execute system commands from redis-cli using lua script or something? 10:42:17 GMT we just need to run a couple of sed commands to find and replace some lines in couple of system files 10:42:37 GMT otherwise we'll have to bring down the server and in recoverymode change the files which will cause a downtime 10:43:32 GMT in local when i run redis-cli EVAL "$(sed -i 's/abc/def/' test.conf)" 10:43:35 GMT this works fine 10:46:04 GMT EVAL runs lua 10:46:06 GMT not shell code 10:46:18 GMT it works fine locally because your shell executes the sed before even starting redis-cli 10:46:49 GMT ah alright.. 10:47:14 GMT also, when we tried to run a lua script with --eval im not able to access lua std libraries like io / os 10:48:03 GMT correct 10:48:05 GMT it's sandboxed 10:48:07 GMT Habbie: is there any way we can do this? 10:48:18 GMT there are some articles on hacking machines via open redis 10:48:21 GMT i have no personal experience 10:48:23 GMT antirez even wrote one 10:49:38 GMT okay.. will try googling 11:08:34 GMT no luck guys.. 11:17:11 GMT Habbie: does this, err... script, seem performant to you? 11:17:14 GMT https://www.irccloud.com/pastebin/vGPbLOqy/ 11:17:29 GMT that shouldn't hurt too much 11:17:36 GMT as badboy_ pointed out, you can benchmark it with redis-benchmark 11:17:40 GMT I'm not sure if I can avoid the serializing and deserializing step :/ 11:18:10 GMT is your json actually a key? 11:18:25 GMT it doesn't look like one 11:18:28 GMT so don't put it in keys 11:18:50 GMT actually I guess `launchStatuses` is a key. 11:18:59 GMT it is 11:19:01 GMT do put that in keys 11:19:24 GMT my value (current KEY[1]) would become an arg, correct? 11:20:52 GMT yes 11:29:06 GMT What would some key questions be when deciding whether to create an integration using an Upsert ? I see that upsert is SQL Merge as per https://en.wikipedia.org/wiki/Merge_%28SQL%29 12:25:51 GMT skulblock: if you're running redis under an unprivileged user (default if installed through the package manager) you're shit out of luck unless you have configured sudo for that user 12:26:19 GMT redis is running as root 12:26:39 GMT what can we do? :) 12:27:08 GMT there is this article on antirez' blog that describes it 12:27:25 GMT http://antirez.com/news/96 12:28:22 GMT yes i read that.. sadly issue is sshd service itself is dead.. so even if i create a new user with passwordless entry, i wont be able to ssh 12:28:47 GMT you can probably create cronjobs 12:28:59 GMT at least i've seen people try that 12:40:56 GMT minus: i tried to telnet to the server and it says connected.. 12:41:02 GMT using redis port 12:41:26 GMT not sure how to setup cron using telnet.. lemme google that n see 12:50:12 GMT Well, you have to hack it the same way to need as for the ssh example 12:52:37 GMT yeah every working port i try is pointing to ssh 12:52:57 GMT unable to execute any commands except for echo :) 15:11:33 GMT <_shaggy> https://dpaste.de/PG7K 15:11:43 GMT <_shaggy> can any help me with this : https://dpaste.de/PG7K 15:11:54 GMT <_shaggy> i receive this # AttributeError: 'Redis' object has no attribute 'geoadd' 15:35:15 GMT <_shaggy> any answer for why i receive this # AttributeError: 'Redis' object has no attribute 'geoadd' for https://dpaste.de/PG7K 17:26:37 GMT the answer is easy: learn python (and update your deps) 18:01:18 GMT i'm confused when i connect with redis-cli to a database that doesn't exist and run `keys *` and get results 18:01:28 GMT shouldn't it return nothing or an error 18:01:58 GMT my server has default config of 16 databases and `redis-cli -n 16 keys *` looks like its returning db 0 keys 18:02:57 GMT the first DB is 0 18:03:16 GMT it looks like the SELECT command just fails silently on an invalid value and leaves you on DB 0 18:04:08 GMT that what it looks like to me too, but seemed such a crazy thing to do i wanted to check with others 18:04:17 GMT it ought to at least warn that that is what its doing 18:04:33 GMT yes, it should return an error 18:04:45 GMT agreed, thanks for the confirmation 18:05:03 GMT would be nice if you could send in a patch for that (assuming it's not fixed in the devel version) 18:06:32 GMT i'll look at it, though i'm pretty rusty with c 18:09:25 GMT otherwise open an issue 18:33:24 GMT eatkin: fyi, latest git has unchanged behaviour 19:47:07 GMT minus, SELECT does not fail silently for me; redis-cli -n silenty lies though 19:47:48 GMT even though tcpdump confirms it gets -ERR invalid DB index from redis 19:47:51 GMT so that's a bug in -cli 19:47:51 GMT that's what i meant, Habbie 19:48:15 GMT ok :) 19:48:24 GMT i would be a lot more worried if SELECT did not report failure 19:48:39 GMT :) 19:49:03 GMT redis-cli -n asdf fails silently too