随笔 - 225  文章 - 0  评论 - 6  阅读 - 75098

随笔分类 -  源码阅读笔记

1 2 3 4 5 下一页
阅读源码的笔记
redis6.0.5之cluster.c阅读笔记3-定时任务
摘要:redis6.0.5之cluster.c阅读笔记3-定时任务 ************************************************************************************************ 在server.c中,有集群的定时任务,每秒 阅读全文
posted @ 2021-12-24 17:17 子虚乌有 阅读(125) 评论(0) 推荐(0) 编辑
redis6.0.5之cluster.c阅读笔记2-报文处理
摘要:redis6.0.5之cluster.c阅读笔记2-报文处理 ************************************************************************************************ /* When this function 阅读全文
posted @ 2021-12-22 20:40 子虚乌有 阅读(133) 评论(0) 推荐(0) 编辑
redis6.0.5之cluster.c阅读笔记1-集群初始化
摘要:********************************************************************************* 在server.c文件中,服务器启动的时候,如果是集群模式,那么会调用函数clusterInit void initServer(voi 阅读全文
posted @ 2021-12-16 19:39 子虚乌有 阅读(418) 评论(0) 推荐(0) 编辑
关于redis-6.0.5之sentinel的定时任务
摘要:进过上文(关于redis sentinel的启动 https://www.cnblogs.com/cquccy/p/15625768.html ) 我们知道了默认情况下大概每隔100毫秒就会调用一次sentinel的定时器,那么定时器里面到底做了哪些内容呢? 让我们一起来看下 函数sentinelT 阅读全文
posted @ 2021-12-13 20:45 子虚乌有 阅读(193) 评论(0) 推荐(0) 编辑
备忘gdbredis源码提示xxxxxxxx:没有那个文件或目录
摘要:调试redis sentinel gdb ./src/redis-sentinel set args ./sentinel.conf 加断点 b async.c:redisAsyncRead 开始运行 r 出现提示 523 async.c: 没有那个文件或目录. 找不到async.c源码 输入dir 阅读全文
posted @ 2021-12-02 20:04 子虚乌有 阅读(102) 评论(0) 推荐(0) 编辑
关于redis sentinel的启动
摘要:关于redis sentinel的启动 ****************************************************************************** 1启动方式 可以看到在server.c中,下面这一行判断是否是sentinel模式启动 server. 阅读全文
posted @ 2021-11-30 19:37 子虚乌有 阅读(161) 评论(0) 推荐(0) 编辑
redis关于sentinel配置bind的ip先后顺序问题
摘要:redis关于sentinel配置bind的ip先后顺序问题 准备开始看sentinel相关的代码,首先先启动起来看看情况, 于是准备了3台机器 10.100.13.81 10.100.13.88 10.100.13.160 10.100.13.81作为主 88和160 作为从机, 启动单一的sen 阅读全文
posted @ 2021-11-29 20:28 子虚乌有 阅读(296) 评论(0) 推荐(0) 编辑
redis6.0.5之REPLICAOF同步命令-主从数据同步
摘要:REPLICAOF同步数据 根据注释,版本5以后使用REPLICAOF代替SLAVEOF { "SLAVEOF", "host port", "Make the server a replica of another instance, or promote it as master. Deprec 阅读全文
posted @ 2021-11-29 20:27 子虚乌有 阅读(1120) 评论(0) 推荐(0) 编辑
redis6.0.5一个关于REGISTER_API的小测试(注册API宏定义)
摘要:#include<stdio.h> #define REGISTER_API(name) moduleRegisterApi("RedisModule_" #name , (void *)(unsigned long)RM_ ## name) //定义的api名和函数名 void moduleReg 阅读全文
posted @ 2021-11-10 17:21 子虚乌有 阅读(70) 评论(0) 推荐(0) 编辑
redis6.0.5之anet.c阅读笔记-TCP的封装
摘要:*********************************************************************************************** /* anet.c -- Basic TCP socket stuff made a bit less bo 阅读全文
posted @ 2021-11-01 19:17 子虚乌有 阅读(134) 评论(0) 推荐(0) 编辑
redis6.0.5之Ae阅读笔记-事件相关
摘要:****************************************************************************************** #define AE_OK 0 #define AE_ERR -1 #define AE_NONE 0 /* No e 阅读全文
posted @ 2021-10-26 17:57 子虚乌有 阅读(76) 评论(0) 推荐(0) 编辑
redis6.0.5之aof.c阅读笔记-增量的持久化保存
摘要:*********************************************************************************************** AOF = Append-only file void aofUpdateCurrentSize(void) 阅读全文
posted @ 2021-10-25 19:59 子虚乌有 阅读(169) 评论(0) 推荐(0) 编辑
redis6.0.5之Rio阅读笔记-统一的流读写封装
摘要:#ifndef __REDIS_RIO_H #define __REDIS_RIO_H #include <stdio.h> #include <stdint.h> #include "sds.h" #include "connection.h" #define RIO_FLAG_READ_ERRO 阅读全文
posted @ 2021-10-18 21:32 子虚乌有 阅读(79) 评论(0) 推荐(0) 编辑
redis6.0.5之BIO阅读笔记-后台IO操作
摘要:#ifndef __BIO_H #define __BIO_H /* Exported API */ 供调用的API void bioInit(void); 后台IO初始化 void bioCreateBackgroundJob(int type, void *arg1, void *arg2, v 阅读全文
posted @ 2021-10-08 18:14 子虚乌有 阅读(124) 评论(0) 推荐(0) 编辑
RedisProtocol-redis协议翻译
摘要:https://redis.io/topics/protocol/ 原文地址 为了更好的理解redis协议,借助百度翻译和自己理解翻译了这篇文章。 redis协议确实够简单,容易理解。 ********************************************************* 阅读全文
posted @ 2021-09-29 15:29 子虚乌有 阅读(150) 评论(0) 推荐(0) 编辑
redis6.0.5之networking.c阅读笔记-与客户端通讯
摘要:#include "server.h" #include "atomicvar.h" #include <sys/socket.h> #include <sys/uio.h> #include <math.h> #include <ctype.h> static void setProtocolEr 阅读全文
posted @ 2021-09-28 17:29 子虚乌有 阅读(724) 评论(0) 推荐(0) 编辑
redis6.0.5之pubsub.c阅读笔记-发布订阅
摘要:#include "server.h" int clientSubscriptionsCount(client *c); /* * Pubsub client replies API 发布订阅客户端回复API * */ /* Send a pubsub message of type "messag 阅读全文
posted @ 2021-09-28 17:22 子虚乌有 阅读(54) 评论(0) 推荐(0) 编辑
redis6.0.5之slowlog阅读笔记-慢查询
摘要:***********************************h******************************************************** #ifndef __SLOWLOG_H__ #define __SLOWLOG_H__ #define SLOWL 阅读全文
posted @ 2021-09-18 17:10 子虚乌有 阅读(98) 评论(0) 推荐(0) 编辑
redis6.0.5之multi.c阅读笔记-事务相关
摘要:/* MULTI/EXEC */ /* Client state initialization for MULTI/EXEC */ MULTI/EXEC的客户端状态初始化 void initClientMultiState(client *c) { c->mstate.commands = NULL 阅读全文
posted @ 2021-09-18 08:40 子虚乌有 阅读(97) 评论(0) 推荐(0) 编辑
redis6.0.5之notify.c阅读笔记-消息通知
摘要:/* This file implements keyspace events notification via Pub/Sub and * described at https://redis.io/topics/notifications. */ 这个文件通过Pub/Sub实现键空消息通知事件, 阅读全文
posted @ 2021-09-16 17:25 子虚乌有 阅读(127) 评论(0) 推荐(0) 编辑

1 2 3 4 5 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示