Coder Social home page Coder Social logo

hwware / redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redis/redis

0.0 0.0 3.0 138.1 MB

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

Home Page: http://redis.io

License: Other

Makefile 0.24% Shell 0.27% C 73.88% C++ 0.07% Ruby 0.27% Tcl 24.78% Smarty 0.01% Python 0.46% JavaScript 0.01%

redis's People

Contributors

0xtonyxia avatar antirez avatar artix75 avatar badboy avatar charleschen888 avatar charsyam avatar chenyang8094 avatar devnexen avatar dvirsky avatar enjoy-binbin avatar filipecosta90 avatar geoffgarside avatar guybe7 avatar hpatro avatar huangzhw avatar hwware avatar itamarhaber avatar madolson avatar mattsta avatar meirshpilraien avatar oranagra avatar pietern avatar shooterit avatar soloestoy avatar sundb avatar tezc avatar trevor211 avatar yoav-steinberg avatar yossigo avatar zuiderkwast avatar

Watchers

 avatar  avatar

redis's Issues

[NEW] add 'count' option to the 'RANDOMKEY' command

Regarding to redis#11915

Requirement:

Now RANDOMKEY command return a random key from the currently selected database OR nil when the database is empty
We want to enhancement this command for more features:

  1. Add count option to specified number of keys
  2. Add duplicate option to allow return duplicated or non-duplicated random key
  3. Add pattern option to allow client to specified the key pattern.

The command format could be like this:

RANDOMKEY [COUNT count] [Duplicated ] [Pattern XXXX]
Default: count = 1; non-duplicated; and no patten which means must match exactly keyname

Test fail on Ubuntu 18 platform

There are some memory leak issue on Ubuntu 18 platform.

[exception]: Executing test client: couldn't fork child process: not enough memory.
couldn't fork child process: not enough memory
while executing
"exec cat $filename"
(procedure "sanitizer_errors_from_file" line 2)
invoked from within
"sanitizer_errors_from_file $stderr"
(procedure "check_sanitizer_errors" line 2)
invoked from within
"check_sanitizer_errors [dict get $config stderr]"
(procedure "kill_server" line 78)
invoked from within
"kill_server $srv"
(procedure "start_server_aof" line 6)
invoked from within
"start_server_aof [list dir $server_path] {
assert_equal 1 [is_alive $srv]
}"
("uplevel" body line 4)
invoked from within
"uplevel 1 $code"
(procedure "test" line 51)
invoked from within
"test {Multi Part AOF can start when we have en empty AOF dir} {
create_aof_dir $aof_dirpath

    start_server_aof [list dir $server_path] ..."
("uplevel" body line 289)
invoked from within

"uplevel 1 $code"
(procedure "tags" line 12)
invoked from within
"tags {"external:skip"} {

# Test Part 1

Update LINDEX return value to better response

The problem/use-case that the feature addresses

Current LSET command:

LSET key index element: If key does not exist, return (error) ERR no such key
If key exists, but index out of range return (error) ERR index out of range
If key exists, but type not match, return (error) WRONGTYPE Operation against a key holding the wrong kind of value

We should make the LINDEX has the same return value:

LINDEX key index:

current return value:
If key does not exist, return nil
If key exists, but index out of range, return nil
If key exists, but type not match, return (error) WRONGTYPE Operation against a key holding the wrong kind of value

[NEW] Add two more values for slowlog command

Current slowlog get command return the following 6 values as below:
127.0.0.1:6381[10]> slowlog get

  1. 1.(integer) 7
    2.(integer) 1678218844
    3.(integer) 5
    4. 1."client"
    2."getname"
    5. "127.0.0.1:58806"
    6. "MMM"

  2. 1.(integer) 6
    2.(integer) 1678218835
    3.(integer) 5
    4. 1."client"
    2."setname"
    3."MMM"
    5. "127.0.0.1:58806"
    6. "MMM"

We need add 2 more values for it:
1. database index value which represents which database client executes the command
2. acl username (default username is "default")

Update LRANGE return value

The problem/use-case that the feature addresses
Current command LRANGE
reutnr value is: If key does not exist, return empty array

and in the case: RPUSH mylist "one" "two" "three" "four"๏ผŒ
LRANGE mylist -1 -3
it return empty array as well.
Client can not see the difference, thus suggest to update the return value to return (error) ERR no such key
if If key does not exist

LINSERT insert multiply elements once time

The problem/use-case that the feature addresses

LINSERT key <BEFORE | AFTER> pivot element

Current, this command can only insert one element per call.

new feature: make this command can insert multiply values at one time

Create a new command similar to LINSERT with index

The problem/use-case that the feature addresses

LINSERT key <BEFORE | AFTER> pivot element

Current, LINSERT can insert one element accoriding to the pivot value

new feature: Create a new command and insert element according to the index
It could be: LINSERTI key <BEFORE | AFTER> pivot element or similar

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.