Code Monkey home page Code Monkey logo

redis.jl's Introduction

(see typestable0.6 branch)

Redis.jl

Build Status Coverage Status DataFrames

Redis.jl is a fully-featured Redis client for the Julia programming language. The implementation is an attempt at an easy to understand, minimalistic API that mirrors actual Redis commands as closely as possible.

libhiredis

Merges a debugged version of HiRedis.jl, based on the C-language hiredis interface to Redis. Thus far all basic commands pass tests without modification to the original Redis.jl API. Performance enhancements are significant, see BenchmarkNotes.md for examples. **Redis responses are no longer converted to complex types.

In order to maximize performance, send string commands using do_command: for example, instead of set(conn, "akey", "avalue"), use do_command(conn, "set akey avalue") in order to bypass command parsing. In addition, for use cases where Redis server responses are not required immediately, use pipeline commands: pipeline_command(conn, "set akey value").

TODO:

  • key-prefixing
  • Sentinels tests
  • Implement the libhiredis RedisAsyncContext and redisAsyncCommand interfaces
  • Clusters remain without commands nor tests
  • create a clean benchmark suite

Basics

The Redis.jl API resides in the Redis module.

using Redis

The main entrypoint into the API is the RedisConnection, which represents a stateful TCP connection to a single Redis server instance. A single constructor allows the user to set all parameters while supplying the usual Redis defaults. Once a RedisConnection has been created, it can be used to access any of the expected Redis commands.

conn = RedisConnection() # host=127.0.0.1, port=6379, db=0, no password
# conn = RedisConnection(host="192.168.0.1", port=6380, db=15, password="supersecure")

set(conn, "foo", "bar")
get(conn, "foo") # Returns "bar"

For any Redis command x, the Julia function to call that command is x. Redis commands with spaces in them have their spaces replaced with underscores (_). For those already familiar with available Redis commands, this convention should make the API relatively straightforward to understand. There are two exceptions to this convention due to conflicts with Julia:

  • The type key command is keytype
  • The eval scripting command is evalscript

When the user is finished interacting with Redis, the connection should be destroyed to prevent resource leaks:

disconnect(conn)

The disconnect function can be used with any of the connection types detailed below.

Commands with options

Some Redis commands have a more complex syntax that allows for options to be passed to the command. Redis.jl supports these options through the use of a final varargs parameter to those functions (for example, scan). In these cases, the options should be passed as individual strings at the end of the function.

scan(conn, 0, "match", "foo*")

If users are interested, the API could be improved to provide custom functions for these complex commands.

Pipelining

Redis.jl supports pipelining through the PipelineConnection. Commands are executed in much the same way as standard Redis commands:

pipeline = open_pipeline(conn)
set(pipeline, "somekey", "somevalue")

Commands will be sent directly to the Redis server without waiting for a response. Responses can be read at any time in the future using the read_pipeline command:

responses = read_pipeline(pipeline) # responses == ["OK"]

Important: The current PipelineConnection implementation is not threadsafe. If multiple threads require access to Redis pipelines, a separate PipelineConnection should be created for each thread. This limitation could be addressed in a future commit if there is a need.

Transactions

Redis.jl supports MULTI/EXEC transactions through two methods: using a RedisConnection directly or using a specialized TransactionConnection derived from a parent connection.

Transactions using the RedisConnection

If the user wants to build a transaction a single time and execute it on the server, the simplest way to do so is to send the commands as you would at the Redis cli.

multi(conn)
set(conn, "foo", "bar")
get(conn, "foo") # Returns "QUEUED"
exec(conn) # Returns ["OK", "bar"]
get(conn, "foo") # Returns "bar"

It is important to note that after the final call to exec, the RedisConnection is returned to a 'normal' state.

Transactions using the TransactionConnection

If the user is planning on using multiple transactions on the same connection, it may make sense for the user to keep a separate connection for transactional use. The TransactionConnection is almost identical to the RedisConnection, except that it is always in a MULTI block. The user should never manually call multi with a TransactionConnection.

trans = open_transaction(conn)
set(trans, "foo", "bar")
get(trans, "foo") # Returns "QUEUED"
exec(trans) # Returns ["OK", "bar"]
get(trans, "foo") # Returns "QUEUED"
multi(trans) # Throws a ServerException

Notice the subtle difference from the previous example; after calling exec, the TransactionConnection is placed into another MULTI block rather than returning to a 'normal' state as the RedisConnection does.

Pub/Sub (NEEDS REWRITE)

Redis.jl provides full support for Redis pub/sub. Publishing is accomplished by using the command as normal:

publish(conn, "channel", "hello, world!")

Subscriptions are handled using the SubscriptionConnection. Similar to the TransactionConnection, the SubscriptionConnection is constructed from an existing RedisConnection. Once created, the SubscriptionConnection maintains a simple event loop that will call the user's defined function whenever a message is received on the specified channel.

x = Any[]
f(y) = push!(x, y)
sub = open_subscription(conn)
subscribe(sub, "baz", f)
publish(conn, "baz", "foobar")
x # Returns ["foobar"]

Multiple channels can be subscribed together by providing a Dict{String, Function}.

x = Any[]
f(y) = push!(x, y)
sub = open_subscription(conn)
d = Dict{String, Function}({"baz" => f, "bar" => println})
subscribe(sub, d)
publish(conn, "baz", "foobar")
x # Returns ["foobar"]
publish(conn, "bar", "anything") # "anything" written to stdout

Pattern subscription works in the same way through use of the psubscribe function. Channels can be unsubscribed through unsubscribe and punsubscribe.

Note that the async event loop currently runs until the SubscriptionConnection is disconnected, regardless of how many subscriptions the client has active. Event loop error handling should be improved in an update to the API.

Subscription error handling

When a SubscriptionConnection instance is created via open_subscription, it spawns a routine that runs in the background to process events received from the server. In the case that Redis.jl encounters an error within this loop, the default behavior is to disregard the error and continue on. If the user would like finer control over this error handling, open_subscription accepts an optional Function parameter as its final argument. If this is provided, Redis.jl will call the provided function passing it the caught Exception as its only parameter.

Sentinel

Redis.jl also provides functionality for interacting with Redis Sentinel instances through the SentinelConnection. All Sentinel functionality other than ping is implemented through the sentinel_ functions:

sentinel = SentinelConnection() # Constructor has the same options as RedisConnection
sentinel_masters(sentinel) # Returns an Array{Dict{String, String}} of master info

SentinelConnection is also SubscribableConnection, allowing the user to build a SubscriptionConnection for monitoring cluster health through Sentinel messages. See the Redis Sentinel documentation for more information.

Streaming Scanners

In order to simplify use of the Redis scan commands, SCAN (keys), SSCAN (sets), ZSCAN (ordered sets), and HSCAN (hashes), a streaming interface is provided. To initialize a scan use the appropriate constructor:

KeyScanner(conn::RedisConnection, match::AbstractString, count::Int)

SetScanner(conn::RedisConnection, key::AbstractString, match::AbstractString, count::Int)

OrderedSetScanner(conn::RedisConnection, key::AbstractString, match::AbstractString, count::Int)

HashScanner(conn::RedisConnection, key::AbstractString, match::AbstractString, count::Int)

match is used for pattern matching, and defaults to "*", while count specifies the number of items returned per iteration and defaults to 1.

Three methods are provided for scanning:

next!(ss::StreamScanner, count) retrieves count elements as an Array or Dict. count defaults to the value used in the constructor, but can be modified per request. As per the Redis spec, each call to next! may return one or more elements that were retrieved in a previous call.

collect(ss::StreamScanner) will keep scanning until all the elements have bee retrieved.

collectAsync!(ss::StreamScanner, coll::<Collection Type>; cb::Function==nullcb) enables asynchronous execution of a scan accumulating results in a predefined collection object, with an optional callback parameter that defaults to do nothing. The callback function should take one parameter, the result collection and do something appropriate for that collection type.

Note the following caveats from the Redis documentation at http://redis.io/commands/scan:

* The SCAN family of commands only offer limited guarantees about the returned elements since the collection
that we incrementally iterate can change during the iteration process.

* Basically with COUNT the user specified _the amount of work that should be done at every call in order to
  retrieve elements from the collection_. This is __just a hint__ for the implementation, however generally
  speaking this is what you could expect most of the times from the implementation.

Please refer to the Redis documentation for more details.

Notes

Actual API usage can be found in test/redis_tests.jl.

Redis Commands returning 'NIL'

The following methods return a Nullable{T}(value) corresponding to a Redis 'NIL'.

Strings

  • get(conn, "non_existent_key")
  • mget(conn, "non_existent_key1", "non_existent_key2", "non_existent_key3")

Lists

  • lindex(conn, "non_existent_list", 1)
  • lindex(conn, "one_element_list", 2)
  • lpop(conn, "non_existent_list")
  • rpop(conn, "non_existent_list")
  • rpoplpush(conn, "non_existent_list", "some_list")

Sets

  • spop(conn, "empty_set")
  • srandmember(conn, "empty_set")

####Sorted Sets

  • zrank(conn, "ordered_set", "non_existent_member")
  • zrevrank(conn, "ordered_set", "non_existent_member")
  • zscore(conn, "ordered_set", "non_existent_member")

Hashes

  • hget(conn, "some_hash", "non_existent_field")
  • hmget(conn, "some_hash", "nofield1", "nofield2")

redis.jl's People

Contributors

belvedere-trading-user avatar jkaye2012 avatar merl-dev avatar sbromberger avatar tkelman avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

louismagarshack

redis.jl's Issues

change zrange's return type to Array{AbstractString}

Hi,

after reading the issues with https://github.com/jkaye2012/Redis.jl I figured I would switch to this package!

I have one issue, when using zrange with the option WITHSCORES as described in https://redis.io/commands/zrange , I do not get the expected results because Redis' response is passed through an OrderedSet, thus if I have some overlap between my elements and scores I lose some information.

Could we define zrange with the following call:

@redisfunction "zrange" Vector{AbstractString} key start finish options...

?

travis segfault after pubsub tests complete

don't get this segfault when running tests locally

Pub/Sub    *** glibc detected *** /home/travis/julia/bin/julia: realloc(): invalid pointer: 0x0000000001d899e8 ***
 |    5     1      6
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7da26)[0x7f335cc02a26]
/lib/x86_64-linux-gnu/libc.so.6(realloc+0x28e)[0x7f335cc0778e]
/usr/lib/libhiredis.so(+0x49a8)[0x7f314a4e89a8]
/usr/lib/libhiredis.so(sdscatlen+0x88)[0x7f314a4e8bf8]
/usr/lib/libhiredis.so(__redisAppendCommand+0x10)[0x7f314a4e8690]
/usr/lib/libhiredis.so(redisvAppendCommand+0x27)[0x7f314a4e86e7]
/usr/lib/libhiredis.so(redisvCommand+0x18)[0x7f314a4e8848]
/usr/lib/libhiredis.so(redisCommand+0x87)[0x7f314a4e8917]
[0x7f314abd41ca]
[0x7f314abd40a0]
/home/travis/julia/bin/../lib/libjulia.so.0.5(+0x10b88b)[0x7f335d67788b]
/home/travis/julia/bin/../lib/libjulia.so.0.5(+0x10b1b7)[0x7f335d6771b7]
/home/travis/julia/bin/../lib/libjulia.so.0.5(+0x11f4fa)[0x7f335d68b4fa]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7f335cf4ae9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f335cc7836d]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:01 1058298                            /home/travis/julia/bin/julia
00602000-00603000 r--p 00002000 08:01 1058298                            /home/travis/julia/bin/julia
00603000-00604000 rw-p 00003000 08:01 1058298                            /home/travis/julia/bin/julia
00a10000-0459c000 rw-p 00000000 00:00 0                                  [heap]
3a1ba00000-3a1bb2e000 r-xp 00000000 08:01 1059103                        /home/travis/julia/lib/julia/libcrypto.so.6
3a1bb2e000-3a1bd2d000 ---p 0012e000 08:01 1059103                        /home/travis/julia/lib/julia/libcrypto.so.6
3a1bd2d000-3a1bd4e000 rw-p 0012d000 08:01 1059103                        /home/travis/julia/lib/julia/libcrypto.so.6
3a1bd4e000-3a1bd52000 rw-p 00000000 00:00 0 
3a1be00000-3a1be48000 r-xp 00000000 08:01 1059143                        /home/travis/julia/lib/julia/libssl.so.6
3a1be48000-3a1c048000 ---p 00048000 08:01 1059143                        /home/travis/julia/lib/julia/libssl.so.6
3a1c048000-3a1c04e000 rw-p 00048000 08:01 1059143                        /home/travis/julia/lib/julia/libssl.so.6
7f3134000000-7f3134021000 rw-p 00000000 00:00 0 
7f3134021000-7f3138000000 ---p 00000000 00:00 0 
7f313898e000-7f313b0a9000 r--p 00000000 08:01 1059132                    /home/travis/julia/lib/julia/sys.so
7f313b0a9000-7f313c000000 r--p 00000000 08:01 1059153                    /home/travis/julia/lib/libjulia.so.0.5.0
7f313c000000-7f313c021000 rw-p 00000000 00:00 0 
7f313c021000-7f3140000000 ---p 00000000 00:00 0 
7f3140000000-7f3140021000 rw-p 00000000 00:00 0 
7f3140021000-7f3144000000 ---p 00000000 00:00 0 
7f3144000000-7f3144021000 rw-p 00000000 00:00 0 
7f3144021000-7f3148000000 ---p 00000000 00:00 0 
7f31480f4000-7f31482ae000 r--p 00000000 08:01 2202                       /lib/x86_64-linux-gnu/libc-2.15.so
7f31482ae000-7f31482af000 ---p 00000000 00:00 0 
7f31482af000-7f3148aaf000 rw-p 00000000 00:00 0                          [stack:2335]
7f3148aaf000-7f3148ab0000 ---p 00000000 00:00 0 
7f3148ab0000-7f31492b0000 rw-p 00000000 00:00 0                          [stack:2334]
7f31492b0000-7f31492b1000 ---p 00000000 00:00 0 
7f31492b1000-7f3149ab1000 rw-p 00000000 00:00 0                          [stack:2333]
7f3149ab1000-7f3149ab2000 ---p 00000000 00:00 0 
7f3149ab2000-7f314a2b2000 rw-p 00000000 00:00 0                          [stack:2332]
7f314a2b2000-7f314a2e0000 r-xp 00000000 08:01 1059088                    /home/travis/julia/lib/julia/libopenlibm.so.2.3
7f314a2e0000-7f314a4e0000 ---p 0002e000 08:01 1059088                    /home/travis/julia/lib/julia/libopenlibm.so.2.3
7f314a4e0000-7f314a4e1000 r--p 0002e000 08:01 1059088                    /home/travis/julia/lib/julia/libopenlibm.so.2.3
7f314a4e1000-7f314a4e3000 rw-p 0002f000 08:01 1059088                    /home/travis/julia/lib/julia/libopenlibm.so.2.3
7f314a4e3000-7f314a4e4000 rw-p 0003c000 08:01 1059088                    /home/travis/julia/lib/julia/libopenlibm.so.2.3
7f314a4e4000-7f314a4ed000 r-xp 00000000 08:01 941                        /usr/lib/libhiredis.so.0.10
7f314a4ed000-7f314a6ec000 ---p 00009000 08:01 941                        /usr/lib/libhiredis.so.0.10
7f314a6ec000-7f314a6ed000 r--p 00008000 08:01 941                        /usr/lib/libhiredis.so.0.10
7f314a6ed000-7f314a6ee000 rw-p 00009000 08:01 941                        /usr/lib/libhiredis.so.0.10
7f314a6ee000-7f314a9ee000 rw-p 00000000 00:00 0 
7f314a9ee000-7f314aaee000 r--p 00000000 00:00 0 
7f314aaee000-7f314abee000 r-xp 00000000 00:00 0 
7f314abee000-7f314ac1f000 r-xp 00000000 08:01 1059087                    /home/travis/julia/lib/julia/libspqr.so
7f314ac1f000-7f314ae1e000 ---p 00031000 08:01 1059087                    /home/travis/julia/lib/julia/libspqr.so
7f314ae1e000-7f314ae1f000 r--p 00030000 08:01 1059087                    /home/travis/julia/lib/julia/libspqr.so
7f314ae1f000-7f314ae20000 rw-p 00031000 08:01 1059087                    /home/travis/julia/lib/julia/libspqr.so
7f314ae20000-7f314aee4000 r-xp 00000000 08:01 1059128                    /home/travis/julia/lib/julia/libumfpack.so
7f314aee4000-7f314b0e3000 ---p 000c4000 08:01 1059128                    /home/travis/julia/lib/julia/libumfpack.so
7f314b0e3000-7f314b0e4000 r--p 000c3000 08:01 1059128                    /home/travis/julia/lib/julia/libumfpack.so
7f314b0e4000-7f314b0e5000 rw-p 000c4000 08:01 1059128                    /home/travis/julia/lib/julia/libumfpack.so
7f314b0e5000-7f314b0e6000 r-xp 00000000 08:01 1059131                    /home/travis/julia/lib/julia/libsuitesparse_wrapper.so
7f314b0e6000-7f314b2e5000 ---p 00001000 08:01 1059131                    /home/travis/julia/lib/julia/libsuitesparse_wrapper.so
7f314b2e5000-7f314b2e6000 r--p 00000000 08:01 1059131                    /home/travis/julia/lib/julia/libsuitesparse_wrapper.so
7f314b2e6000-7f314b2e7000 rw-p 00001000 08:01 1059131                    /home/travis/julia/lib/julia/libsuitesparse_wrapper.so
7f314b2e7000-7f314b2e9000 r-xp 00000000 08:01 1059145                    /home/travis/julia/lib/julia/libsuitesparseconfig.so
7f314b2e9000-7f314b4e8000 ---p 00002000 08:01 1059145                    /home/travis/julia/lib/julia/libsuitesparseconfig.so
7f314b4e8000-7f314b4e9000 r--p 00001000 08:01 1059145                    /home/travis/julia/lib/julia/libsuitesparseconfig.so
7f314b4e9000-7f314b4ea000 rw-p 00002000 08:01 1059145                    /home/travis/julia/lib/julia/libsuitesparseconfig.so
7f314b4ea000-7f314b4f5000 r-xp 00000000 08:01 1059144                    /home/travis/julia/lib/julia/libccolamd.so
7f314b4f5000-7f314b6f4000 ---p 0000b000 08:01 1059144                    /home/travis/julia/lib/julia/libccolamd.so
7f314b6f4000-7f314b6f5000 r--p 0000a000 08:01 1059144                    /home/travis/julia/lib/julia/libccolamd.so
7f314b6f5000-7f314b6f6000 rw-p 0000b000 08:01 1059144                    /home/travis/julia/lib/julia/libccolamd.so
7f314b6f6000-7f314b700000 r-xp 00000000 08:01 1059092                    /home/travis/julia/lib/julia/libcamd.so
7f314b700000-7f314b8ff000 ---p 0000a000 08:01 1059092                    /home/travis/julia/lib/julia/libcamd.so
7f314b8ff000-7f314b900000 r--p 00009000 08:01 1059092                    /home/travis/julia/lib/julia/libcamd.so
7f314b900000-7f314b901000 rw-p 0000a000 08:01 1059092                    /home/travis/julia/lib/julia/libcamd.so
7f314b901000-7f314b90a000 r-xp 00000000 08:01 1059147                    /home/travis/julia/lib/julia/libamd.so
7f314b90a000-7f314bb09000 ---p 00009000 08:01 1059147                    /home/travis/julia/lib/julia/libamd.so
7f314bb09000-7f314bb0a000 r--p 00008000 08:01 1059147                    /home/travis/julia/lib/julia/libamd.so
7f314bb0a000-7f314bb0b000 rw-p 00009000 08:01 1059147                    /home/travis/julia/lib/julia/libamd.so
7f314bb0b000-7f314bb12000 r-xp 00000000 08:01 1059148                    /home/travis/julia/lib/julia/libcolamd.so
7f314bb12000-7f314bd11000 ---p 00007000 08:01 1059148                    /home/travis/julia/lib/julia/libcolamd.so
7f314bd11000-7f314bd12000 r--p 00006000 08:01 1059148                    /home/travis/julia/lib/julia/libcolamd.so
7f314bd12000-7f314bd13000 rw-p 00007000 08:01 1059148                    /home/travis/julia/lib/julia/libcolamd.so
7f314bd13000-7f314be0e000 r-xp 00000000 08:01 1059120                    /home/travis/julia/lib/julia/libcholmod.so
7f314be0e000-7f314c00d000 ---p 000fb000 08:01 1059120                    /home/travis/julia/lib/julia/libcholmod.so
7f314c00d000-7f314c00e000 r--p 000fa000 08:01 1059120                    /home/travis/julia/lib/julia/libcholmod.so
7f314c00e000-7f314c00f000 rw-p 000fb000 08:01 1059120                    /home/travis/julia/lib/julia/libcholmod.so
7f314c00f000-7f314c027000 r-xp 00000000 08:01 2288                       /lib/x86_64-linux-gnu/libresolv-2.15.so
7f314c027000-7f314c227000 ---p 00018000 08:01 2288                       /lib/x86_64-linux-gnu/libresolv-2.15.so
7f314c227000-7f314c228000 r--p 00018000 08:01 2288                       /lib/x86_64-linux-gnu/libresolv-2.15.so
7f314c228000-7f314c229000 rw-p 00019000 08:01 2288                       /lib/x86_64-linux-gnu/libresolv-2.15.so
7f314c229000-7f314c22b000 rw-p 00000000 00:00 0 
7f314c22b000-7f314c22e000 r-xp 00000000 08:01 2177                       /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f314c22e000-7f314c42d000 ---p 00003000 08:01 2177                       /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f314c42d000-7f314c42e000 r--p 00002000 08:01 2177                       /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f314c42e000-7f314c42f000 rw-p 00003000 08:01 2177                       /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f314c42f000-7f314c436000 r-xp 00000000 08:01 27424                      /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f314c436000-7f314c635000 ---p 00007000 08:01 27424                      /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f314c635000-7f314c636000 r--p 00006000 08:01 27424                      /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f314c636000-7f314c637000 rw-p 00007000 08:01 27424                      /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f314c637000-7f314c65c000 r-xp 00000000 08:01 27721                      /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f314c65c000-7f314c85c000 ---p 00025000 08:01 27721                      /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f314c85c000-7f314c85d000 r--p 00025000 08:01 27721                      /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f314c85d000-7f314c85e000 rw-p 00026000 08:01 27721                      /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f314c85e000-7f314c85f000 rw-p 00000000 00:00 0 
7f314c85f000-7f314c862000 r-xp 00000000 08:01 2161                       /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f314c862000-7f314ca61000 ---p 00003000 08:01 2161                       /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f314ca61000-7f314ca62000 r--p 00002000 08:01 2161                       /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f314ca62000-7f314ca63000 rw-p 00003000 08:01 2161                       /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f314ca63000-7f314cb27000 r-xp 00000000 08:01 27376                      /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f314cb27000-7f314cd26000 ---p 000c4000 08:01 27376                      /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f314cd26000-7f314cd30000 r--p 000c3000 08:01 27376                      /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f314cd30000-7f314cd31000 rw-p 000cd000 08:01 27376                      /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f314cd31000-7f314cd6d000 r-xp 00000000 08:01 27353                      /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f314cd6d000-7f314cf6d000 ---p 0003c000 08:01 27353                      /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f314cf6d000-7f314cf6e000 r--p 0003c000 08:01 27353                      /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f314cf6e000-7f314cf70000 rw-p 0003d000 08:01 27353                      /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f314cf70000-7f314cfbc000 r-xp 00000000 08:01 1059085                    /home/travis/julia/lib/julia/libmbedcrypto.so.2.3.0
7f314cfbc000-7f314d1bb000 ---p 0004c000 08:01 1059085                    /home/travis/julia/lib/julia/libmbedcrypto.so.2.3.0
7f314d1bb000-7f314d1be000 r--p 0004b000 08:01 1059085                    /home/travis/julia/lib/julia/libmbedcrypto.so.2.3.0
7f314d1be000-7f314d1bf000 rw-p 0004e000 08:01 1059085                    /home/travis/julia/lib/julia/libmbedcrypto.so.2.3.0
7f314d1bf000-7f314d1c2000 rw-p 00000000 00:00 0 
7f314d1c2000-7f314d1d4000 r-xp 00000000 08:01 1059099                    /home/travis/julia/lib/julia/libmbedx509.so.2.3.0
7f314d1d4000-7f314d3d3000 ---p 00012000 08:01 1059099                    /home/travis/julia/lib/julia/libmbedx509.so.2.3.0
7f314d3d3000-7f314d3d4000 r--p 00011000 08:01 1059099                    /home/travis/julia/lib/julia/libmbedx509.so.2.3.0
7f314d3d4000-7f314d3d5000 rw-p 00012000 08:01 1059099                    /home/travis/julia/lib/julia/libmbedx509.so.2.3.0
7f314d3d5000-7f314d3fa000 r-xp 00000000 08:01 1059133                    /home/travis/julia/lib/julia/libmbedtls.so.2.3.0
7f314d3fa000-7f314d5f9000 ---p 00025000 08:01 1059133                    /home/travis/julia/lib/julia/libmbedtls.so.2.3.0
7f314d5f9000-7f314d5fb000 r--p 00024000 08:01 1059133                    /home/travis/julia/lib/julia/libmbedtls.so.2.3.0
7f314d5fb000-7f314d5fc000 rw-p 00026000 08:01 1059133                    /home/travis/julia/lib/julia/libmbedtls.so.2.3.0
7f314d5fc000-7f314d62b000 r-xp 00000000 08:01 1059123                    /home/travis/julia/lib/julia/libssh2.so.1.0.1
7f314d62b000-7f314d82a000 ---p 0002f000 08:01 1059123                    /home/travis/julia/lib/julia/libssh2.so.1.0.1
7f314d82a000-7f314d82b000 r--p 0002e000 08:01 1059123                    /home/travis/julia/lib/julia/libssh2.so.1.0.1
7f314d82b000-7f314d82c000 rw-p 0002f000 08:01 1059123                    /home/travis/julia/lib/julia/libssh2.so.1.0.1
7f314d82c000-7f314d88a000 r-xp 00000000 08:01 1059151                    /home/travis/julia/lib/julia/libcurl.so.4.4.0
7f314d88a000-7f314da89000 ---p 0005e000 08:01 1059151                    /home/travis/julia/lib/julia/libcurl.so.4.4.0
7f314da89000-7f314da8b000 r--p 0005d000 08:01 1059151                    /home/travis/julia/lib/julia/libcurl.so.4.4.0
7f314da8b000-7f314da8c000 rw-p 0005f000 08:01 1059151                    /home/travis/julia/lib/julia/libcurl.so.4.4.0
7f314da8c000-7f314db88000 r-xp 00000000 08:01 1059138                    /home/travis/julia/lib/julia/libgit2.so.0.24.0
7f314db88000-7f314dd88000 ---p 000fc000 08:01 1059138                    /home/travis/julia/lib/julia/libgit2.so.0.24.0
7f314dd88000-7f314dd89000 r--p 000fc000 08:01 1059138                    /home/travis/julia/lib/julia/libgit2.so.0.24.0
7f314dd89000-7f314dd8b000 rw-p 000fd000 08:01 1059138                    /home/travis/julia/lib/julia/libgit2.so.0.24.0
7f314dd8b000-7f314dd8c000 rw-p 00000000 00:00 0 
7f314dd8c000-7f314fd8c000 rw-p 00000000 00:00 0 
7f314fd8c000-7f3151d8c000 rw-p 00000000 00:00 0 
7f3151d8c000-7f3151d8d000 ---p 00000000 00:00 0 
7f3151d8d000-7f315258d000 rw-p 00000000 00:00 0                          [stack:2306]
7f315258d000-7f31525cb000 r-xp 00000000 08:01 1059102                    /home/travis/julia/lib/julia/libquadmath.so.0
7f31525cb000-7f31527ca000 ---p 0003e000 08:01 1059102                    /home/travis/julia/lib/julia/libquadmath.so.0
7f31527ca000-7f31527cb000 r--p 0003d000 08:01 1059102                    /home/travis/julia/lib/julia/libquadmath.so.0
7f31527cb000-7f31527cc000 rw-p 0003e000 08:01 1059102                    /home/travis/julia/lib/julia/libquadmath.so.0
7f31527cc000-7f31527cd000 rw-p 000e9000 08:01 1059102                    /home/travis/julia/lib/julia/libquadmath.so.0
7f31527cd000-7f31528f1000 r-xp 00000000 08:01 1059084                    /home/travis/julia/lib/julia/libgfortran.so.3
7f31528f1000-7f3152af1000 ---p 00124000 08:01 1059084                    /home/travis/julia/lib/julia/libgfortran.so.3
7f3152af1000-7f3152af2000 r--p 00124000 08:01 1059084                    /home/travis/julia/lib/julia/libgfortran.so.3
7f3152af2000-7f3152af4000 rw-p 00125000 08:01 1059084                    /home/travis/julia/lib/julia/libgfortran.so.3
7f3152af4000-7f3154b9a000 r-xp 00000000 08:01 1059119                    /home/travis/julia/lib/julia/libopenblas64_.so
7f3154b9a000-7f3154d99000 ---p 020a6000 08:01 1059119                    /home/travis/julia/lib/julia/libopenblas64_.so
7f3154d99000-7f3154d9f000 r--p 020a5000 08:01 1059119                    /home/travis/julia/lib/julia/libopenblas64_.so
7f3154d9f000-7f3154db9000 rw-p 020ab000 08:01 1059119                    /home/travis/julia/lib/julia/libopenblas64_.so
7f3154db9000-7f3154e19000 rw-p 00000000 00:00 0 
7f3154e19000-7f3154e5b000 rw-p 021b9000 08:01 1059119                    /home/travis/julia/lib/julia/libopenblas64_.so
7f3154e5b000-7f3154e5e000 r-xp 00000000 08:01 1059079                    /home/travis/julia/lib/julia/libdSFMT.so
7f3154e5e000-7f315505d000 ---p 00003000 08:01 1059079                    /home/travis/julia/lib/julia/libdSFMT.so
7f315505d000-7f315505e000 r--p 00002000 08:01 1059079                    /home/travis/julia/lib/julia/libdSFMT.so
7f315505e000-7f315505f000 rw-p 00003000 08:01 1059079                    /home/travis/julia/lib/julia/libdSFMT.so
7f315505f000-7f31550bf000 r-xp 00000000 08:01 1059108                    /home/travis/julia/lib/julia/libmpfr.so.4.1.4
7f31550bf000-7f31552be000 ---p 00060000 08:01 1059108                    /home/travis/julia/lib/julia/libmpfr.so.4.1.4
7f31552be000-7f31552c0000 r--p 0005f000 08:01 1059108                    /home/travis/julia/lib/julia/libmpfr.so.4.1.4
7f31552c0000-7f31552c1000 rw-p 00061000 08:01 1059108                    /home/travis/julia/lib/julia/libmpfr.so.4.1.4
7f31552c1000-7f3155334000 r-xp 00000000 08:01 1059146                    /home/travis/julia/lib/julia/libgmp.so.10.3.0
7f3155334000-7f3155533000 ---p 00073000 08:01 1059146                    /home/travis/julia/lib/julia/libgmp.so.10.3.0
7f3155533000-7f3155534000 r--p 00072000 08:01 1059146                    /home/travis/julia/lib/julia/libgmp.so.10.3.0
7f3155534000-7f3155535000 rw-p 00073000 08:01 1059146                    /home/travis/julia/lib/julia/libgmp.so.10.3.0
7f3155535000-7f3155635000 rw-p 00000000 00:00 0 
7f3155635000-7f31556b6000 r-xp 00000000 08:01 1059134                    /home/travis/julia/lib/julia/libpcre2-8.so.0.3.0
7f31556b6000-7f31558b5000 ---p 00081000 08:01 1059134                    /home/travis/julia/lib/julia/libpcre2-8.so.0.3.0
7f31558b5000-7f31558b6000 r--p 00080000 08:01 1059134                    /home/travis/julia/lib/julia/libpcre2-8.so.0.3.0
7f31558b6000-7f31558b7000 rw-p 00081000 08:01 1059134                    /home/travis/julia/lib/julia/libpcre2-8.so.0.3.0
7f31558b7000-7f3155b04000 rw-p 00000000 00:00 0 
7f3155b04000-7f3356b18000 rw-p 00000000 00:00 0 
7f3356b18000-7f335751b000 rw-p 00000000 00:00 0 
7f335751b000-7f335751c000 ---p 00000000 00:00 0 
7f335751c000-7f3357d1c000 rw-p 00000000 00:00 0 
7f3357d1c000-7f3359b1f000 r-xp 00000000 08:01 1059132                    /home/travis/julia/lib/julia/sys.so
7f3359b1f000-7f3359d1e000 ---p 01e03000 08:01 1059132                    /home/travis/julia/lib/julia/sys.so
7f3359d1e000-7f3359d80000 r--p 01e02000 08:01 1059132                    /home/travis/julia/lib/julia/sys.so
7f3359d80000-7f3359d81000 rw-p 01e64000 08:01 1059132                    /home/travis/julia/lib/julia/sys.so
7f3359d81000-7f3359dab000 rw-p 00000000 00:00 0 
7f3359dab000-7f3359dac000 ---p 00000000 00:00 0 
7f3359dac000-7f335a5ac000 rw-p 00000000 00:00 0                          [stack:2305]
7f335a5ac000-7f335a877000 r--p 00000000 08:01 2712                       /usr/lib/locale/locale-archive
7f335a877000-7f335a88d000 r-xp 00000000 08:01 2252                       /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f335a88d000-7f335aa8c000 ---p 00016000 08:01 2252                       /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f335aa8c000-7f335aa8d000 r--p 00015000 08:01 2252                       /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f335aa8d000-7f335aa8e000 rw-p 00016000 08:01 2252                       /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7f335aa8e000-7f335aaa4000 r-xp 00000000 08:01 1059090                    /home/travis/julia/lib/julia/libgcc_s.so.1
7f335aaa4000-7f335aca3000 ---p 00016000 08:01 1059090                    /home/travis/julia/lib/julia/libgcc_s.so.1
7f335aca3000-7f335aca4000 r--p 00015000 08:01 1059090                    /home/travis/julia/lib/julia/libgcc_s.so.1
7f335aca4000-7f335aca5000 rw-p 00016000 08:01 1059090                    /home/travis/julia/lib/julia/libgcc_s.so.1
7f335aca5000-7f335ada0000 r-xp 00000000 08:01 2282                       /lib/x86_64-linux-gnu/libm-2.15.so
7f335ada0000-7f335af9f000 ---p 000fb000 08:01 2282                       /lib/x86_64-linux-gnu/libm-2.15.so
7f335af9f000-7f335afa0000 r--p 000fa000 08:01 2282                       /lib/x86_64-linux-gnu/libm-2.15.so
7f335afa0000-7f335afa1000 rw-p 000fb000 08:01 2282                       /lib/x86_64-linux-gnu/libm-2.15.so
7f335afa1000-7f335b112000 r-xp 00000000 08:01 1059125                    /home/travis/julia/lib/julia/libstdc++.so.6
7f335b112000-7f335b311000 ---p 00171000 08:01 1059125                    /home/travis/julia/lib/julia/libstdc++.so.6
7f335b311000-7f335b31b000 r--p 00170000 08:01 1059125                    /home/travis/julia/lib/julia/libstdc++.so.6
7f335b31b000-7f335b31d000 rw-p 0017a000 08:01 1059125                    /home/travis/julia/lib/julia/libstdc++.so.6
7f335b31d000-7f335b321000 rw-p 00000000 00:00 0 
7f335b321000-7f335c86a000 r-xp 00000000 08:01 1059081                    /home/travis/julia/lib/julia/libLLVM-3.7.so
7f335c86a000-7f335ca6a000 ---p 01549000 08:01 1059081                    /home/travis/julia/lib/julia/libLLVM-3.7.so
7f335ca6a000-7f335cb62000 r--p 01549000 08:01 1059081                    /home/travis/julia/lib/julia/libLLVM-3.7.so
7f335cb62000-7f335cb75000 rw-p 01641000 08:01 1059081                    /home/travis/julia/lib/julia/libLLVM-3.7.so
7f335cb75000-7f335cb85000 rw-p 00000000 00:00 0 
7f335cb85000-7f335cd39000 r-xp 00000000 08:01 2202                       /lib/x86_64-linux-gnu/libc-2.15.so
7f335cd39000-7f335cf38000 ---p 001b4000 08:01 2202                       /lib/x86_64-linux-gnu/libc-2.15.so
7f335cf38000-7f335cf3c000 r--p 001b3000 08:01 2202                       /lib/x86_64-linux-gnu/libc-2.15.so
7f335cf3c000-7f335cf3e000 rw-p 001b7000 08:01 2202                       /lib/x86_64-linux-gnu/libc-2.15.so
7f335cf3e000-7f335cf43000 rw-p 00000000 00:00 0 
7f335cf43000-7f335cf5b000 r-xp 00000000 08:01 2290                       /lib/x86_64-linux-gnu/libpthread-2.15.so
7f335cf5b000-7f335d15a000 ---p 00018000 08:01 2290                       /lib/x86_64-linux-gnu/libpthread-2.15.so
7f335d15a000-7f335d15b000 r--p 00017000 08:01 2290                       /lib/x86_64-linux-gnu/libpthread-2.15.so
7f335d15b000-7f335d15c000 rw-p 00018000 08:01 2290                       /lib/x86_64-linux-gnu/libpthread-2.15.so
7f335d15c000-7f335d160000 rw-p 00000000 00:00 0 
7f335d160000-7f335d167000 r-xp 00000000 08:01 2194                       /lib/x86_64-linux-gnu/librt-2.15.so
7f335d167000-7f335d366000 ---p 00007000 08:01 2194                       /lib/x86_64-linux-gnu/librt-2.15.so
7f335d366000-7f335d367000 r--p 00006000 08:01 2194                       /lib/x86_64-linux-gnu/librt-2.15.so
7f335d367000-7f335d368000 rw-p 00007000 08:01 2194                       /lib/x86_64-linux-gnu/librt-2.15.so
7f335d368000-7f335d36a000 r-xp 00000000 08:01 2248                       /lib/x86_64-linux-gnu/libdl-2.15.so
7f335d36a000-7f335d56a000 ---p 00002000 08:01 2248                       /lib/x86_64-linux-gnu/libdl-2.15.so
7f335d56a000-7f335d56b000 r--p 00002000 08:01 2248                       /lib/x86_64-linux-gnu/libdl-2.15.so
7f335d56b000-7f335d56c000 rw-p 00003000 08:01 2248                       /lib/x86_64-linux-gnu/libdl-2.15.so
7f335d56c000-7f335d712000 r-xp 00000000 08:01 1059153                    /home/travis/julia/lib/libjulia.so.0.5.0
7f335d712000-7f335d911000 ---p 001a6000 08:01 1059153                    /home/travis/julia/lib/libjulia.so.0.5.0
7f335d911000-7f335d914000 r--p 001a5000 08:01 1059153                    /home/travis/julia/lib/libjulia.so.0.5.0
7f335d914000-7f335d952000 rw-p 001a8000 08:01 1059153                    /home/travis/julia/lib/libjulia.so.0.5.0
7f335d952000-7f335db6e000 rw-p 00000000 00:00 0 
7f335db6e000-7f335db90000 r-xp 00000000 08:01 2179                       /lib/x86_64-linux-gnu/ld-2.15.so
7f335dbb3000-7f335dbf4000 rw-p 00000000 00:00 0 
7f335dc19000-7f335dc25000 r--p 00000000 08:01 1058298                    /home/travis/julia/bin/julia
7f335dc25000-7f335dc35000 rwxp 00000000 00:00 0 
7f335dc35000-7f335dd7f000 rw-p 00000000 00:00 0 
7f335dd88000-7f335dd8b000 rw-p 00000000 00:00 0 
7f335dd8b000-7f335dd8e000 r--p 00000000 00:00 0 
7f335dd8e000-7f335dd90000 rw-p 00000000 00:00 0 
7f335dd90000-7f335dd91000 r--p 00022000 08:01 2179                       /lib/x86_64-linux-gnu/ld-2.15.so
7f335dd91000-7f335dd93000 rw-p 00023000 08:01 2179                       /lib/x86_64-linux-gnu/ld-2.15.so
7ffe22c45000-7ffe22c99000 rw-p 00000000 00:00 0                          [stack]
7ffe22cca000-7ffe22ccc000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
signal (6): Aborted
while loading no file, in expression starting on line 0
Allocations: 7522492 (Pool: 7521393; Big: 1099); GC: 12
================================[ ERROR: Redis ]================================
failed process: Process(`/home/travis/julia/bin/julia -Cx86-64 -J/home/travis/julia/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=user --inline=no --color=no --compilecache=yes /home/travis/.julia/v0.5/Redis/test/runtests.jl`, ProcessSignaled(6)) [0]
================================================================================
ERROR: Redis had test errors
 in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at ./pkg/entry.jl:740
 in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at ./<missing>:0
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./pkg/dir.jl:31
 in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./<missing>:0
 in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
 in (::Base.Pkg.#kw##test)(::Array{Any,1}, ::Base.Pkg.#test, ::String, ::Vararg{String,N}) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318

intermittent BoundsError for allkeyscanner

on iteration 30 of test run

allkeyscanner: Error During Test
  Got an exception of type BoundsError outside of a @test
  BoundsError: attempt to access 3-element Array{String,1} at index [4]
  Stacktrace:
   [1] next(::Redis.AllKeyScanner, ::Int64) at /home/yjb/.julia/v0.6/Redis/src/scaniterators.jl:53
   [2] macro expansion at /home/yjb/.julia/v0.6/Redis/test/runtests.jl:349 [inlined]
   [3] macro expansion at ./test.jl:853 [inlined]
   [4] macro expansion at /home/yjb/.julia/v0.6/Redis/test/runtests.jl:0 [inlined]
   [5] macro expansion at ./test.jl:853 [inlined]
   [6] anonymous at ./<missing>:?
   [7] include_from_node1(::String) at ./loading.jl:539
   [8] include(::String) at ./sysimg.jl:14
   [9] process_options(::Base.JLOptions) at ./client.jl:305
   [10] _start() at ./client.jl:371
Test Summary:   | Pass  Error  Total
Scan Iterators  |   12      1     13
  allkeyscanner |    3      1      4
  keyscanner    |    9             9

multi-word strings (with spaces) broken up into separate tokens

conn = RedisConnection()
lpush(conn, "testkey", "this is a multi-word string")

now registers 5 entries, whereas previous versions of package correctly pushed only one string.

set(conn, "testk", "this is a string")

returns an error, which is consistent with redis-cli when string unquoted.

Solution may be to use RESP for all commands with this issue, although it was not present in previous versions of the package.

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.