huangzworks / redis Goto Github PK
View Code? Open in Web Editor NEW《Redis Command Reference》全文的中文翻译版。
Home Page: http://RedisDoc.com
《Redis Command Reference》全文的中文翻译版。
Home Page: http://RedisDoc.com
将列表key下标为index的元素的值“甚至”为value。 应为设置
因为数据集比较大,不想全部返回应用程序后再去匹配
补上关于纯函数一节。
以及关于 EVALSHA 行为描述的一节。
想请教一下大神关于redis源码中replication.c文件的feedReplicationBacklog方法。
这个方法中,server.repl_backlog_off到底是什么意思。既然有了server.master_repl_offset表示全局的偏移量,为什么还要有server.repl_backlog_off。而且为什么一定要满足以下公式:
server.repl_backlog_off = server.master_repl_offset - server.repl_backlog_histlen + 1;
为了方便直接在github阅读
有PDF版本么??
看redis的介绍,在m-s下存在一致性的问题,两个问题没有理清,希望能得到一些指导
谢谢!
TODO 列表:
SCAN
及相关命令的翻译。目前已经翻译了一部分,但还有另外一部分未翻译,要找时间补完。
On the other hand defining commands using a special command or via redis.conf would be a problem for a few reasons:
In order to avoid the above three problems and at the same time don't incur in the bandwidth penalty, Redis implements the EVALSHA command.
你好
在 #23 直接写和读 master ,而不要写 master ,然后读 slave。这种情况的话,如果我使用redis的客户端工具jedis操作,该如何实现呢?
1. 如果我jedis配置连接只配置master主节点,当主节点宕机后,我代码的配置文件之前配置的都是原先3个master的节点, 新晋升的由slave-> master节点,在我不改变代码的情况下,是不是就没有办法操作新的master节点呢?
2. 如果我这边jedis配置将redis的6个节点全部配置的话,在服务器将slave设置为readonly,是否有什么办法解决某些业务场景我需要读和写都操作master节点, 不让它去读slave节点的数据呢,避免出现数据不一致的情况呢?
谢谢
Hi,@huangz1990
在server目录下,info.html
文件中写到latest_fork_usec
为最近一次fork()操作耗费的毫秒数。
据我所知,单位应该是微秒数。latest_fork_usec
对应代码里面的变量server.stat_fork_time
,具体参见如下代码段:
server.stat_fork_time = ustime()-start;
/* Return the UNIX time in microseconds */
long long ustime(void) {
struct timeval tv;
long long ust;
gettimeofday(&tv, NULL);
ust = ((long long)tv.tv_sec)*1000000;
ust += tv.tv_usec;
return ust;
}
4月1日, 官方已经发布了3.0版本, 是否有更新计划?
SORT 命令现有的示例太复杂了,要简化。嗯。
问题1:server.master_repl_offset为什么要加1, server.repl_backlog_off 为什么是server.master_repl_offset+1????????
void createReplicationBacklog(void) {
redisAssert(server.repl_backlog == NULL);
server.repl_backlog = zmalloc(server.repl_backlog_size);
server.repl_backlog_histlen = 0;
server.repl_backlog_idx = 0;
server.master_repl_offset++;
server.repl_backlog_off = server.master_repl_offset+1;
}
文档上是说:
redis> LRANGE alpha 0 -1 # 建立一个 5 元素的列表
这里lrange应该是返回alpha整个list的值吧,是否是5个首先要看alpha的个数。另外,使用建立感觉不太好,这里更多是从原来的list中截取后返回一个新的list的意思。
有打算添加3.0的文档么?
主要是命令和cluster-spec的文档内容,或者我翻译一部分然后pr?
目前的命令名同一为大小,在命令比较长的情况下,并不好读。
比如 SRANDMEMBER
就没有 sRandMember
那么清晰地区分命令的各个组成部分。
是否要修改命令名的写法呢?除了驼峰写法之外,是否有其他更好的写法呢?
help restore
RESTORE key ttl serialized-value
summary: Create a key using the provided serialized value, previously obtained using DUMP.
since: 2.6.0
group: generic
这是2.8.9上的help,已经没有了REPLACE的option
比如文章中的 :ref:client_setname
,诸如此类。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.