tech-arch-doc-comments
tech-arch-doc-comments copied to clipboard
[Vssue]反馈问题
https://www.pdai.tech/md/about/me/blog-question.html
作者你好,在项目 Springboot项目开发青铜哪里的项目代码都找不到了,github找不到该页面。
@17365756283
作者你好,在项目 Springboot项目开发青铜哪里的项目代码都找不到了,github找不到该页面。
【项目】中整个章节都会重新整理下,引入更多优秀的学习资源,目前还在更新中,敬请期待。
目前学习SpringBoot项目可以参考SpringBoot 2.5.x 系列教程
pdai,你好,你的网站太棒了,非常感谢。我发现spring有几个网页是空,不知道什么情况?比如: https://pdai.tech/md/spring/spring-x-framework-springmvc.html https://pdai.tech/md/spring/spring-x-framework-annotation.html https://pdai.tech/md/spring/spring-x-framework-spring5.html https://pdai.tech/md/spring/spring-x-framework-springmvc-source-1.html https://pdai.tech/md/spring/springboot/springboot-x-task-hashwheeltimer-timer.html
pdai,你好,你的网站太棒了,非常感谢。我发现spring有几个网页是空,不知道什么情况?比如: https://pdai.tech/md/spring/spring-x-framework-springmvc.html https://pdai.tech/md/spring/spring-x-framework-annotation.html https://pdai.tech/md/spring/spring-x-framework-spring5.html https://pdai.tech/md/spring/spring-x-framework-springmvc-source-1.html https://pdai.tech/md/spring/springboot/springboot-x-task-hashwheeltimer-timer.html
相关文章还没有更新上去,近期会持续更新的~
redis pubsub章节中 原文
发送信息到模式的工作也是由 PUBLISH 命令进行的, 显然就是匹配模式获得Channels,然后再把消息发给客户端。
实际上
PUBLISH 除了将 message 发送到所有订阅 channel 的客户端之外, 它还会将 channel 和 pubsub_patterns 中的模式进行对比, 如果 channel 和某个模式匹配的话, 那么也将 message 发送到订阅那个模式的客户端。
原文中的匹配模式获得Channels有点歧义,我理解实际上应该是publish时根据channel获得所有pattern以及对应的客户端
@JoeyHe912
redis pubsub章节中 原文
发送信息到模式的工作也是由 PUBLISH 命令进行的, 显然就是匹配模式获得Channels,然后再把消息发给客户端。
实际上
PUBLISH 除了将 message 发送到所有订阅 channel 的客户端之外, 它还会将 channel 和 pubsub_patterns 中的模式进行对比, 如果 channel 和某个模式匹配的话, 那么也将 message 发送到订阅那个模式的客户端。
原文中的匹配模式获得Channels有点歧义,我理解实际上应该是publish时根据channel获得所有pattern以及对应的客户端
你好,不是太明白为何会有歧义:
- 其一:这里是有上下文的
原文 已经在上下文中对pubsub_patterns 数据结构进行了说明:
typedef struct pubsubPattern {
redisClient *client;
robj *pattern;
} pubsubPattern;
- 其二:让我们看下源码
如下源码中,通过遍历整个 pubsub_patterns 链表,调用stringmatchlen方法来对pubsub_pattern(dictEntry *de就是pubsub_pattern)中的pattern进行模式匹配(过滤掉不满足的pattern的channel),通过addReplyPubsubPatMessage方法发送给再对pubsub_pattern中的client。
/*
* Publish a message to all the subscribers.
*/
int pubsubPublishMessageInternal(robj *channel, robj *message, pubsubtype type) {
int receivers = 0;
dictEntry *de;
dictIterator *di;
listNode *ln;
listIter li;
/* Send to clients listening for that channel */
de = dictFind(*type.serverPubSubChannels, channel);
if (de) {
list *list = dictGetVal(de);
listNode *ln;
listIter li;
listRewind(list,&li);
while ((ln = listNext(&li)) != NULL) {
client *c = ln->value;
addReplyPubsubMessage(c,channel,message);
updateClientMemUsage(c);
receivers++;
}
}
if (type.shard) {
/* Shard pubsub ignores patterns. */
return receivers;
}
/* Send to clients listening to matching channels */
di = dictGetIterator(server.pubsub_patterns);
if (di) {
channel = getDecodedObject(channel);
while((de = dictNext(di)) != NULL) {
robj *pattern = dictGetKey(de);
list *clients = dictGetVal(de);
// 模式匹配, 过滤掉不满足的pattern的channel
if (!stringmatchlen((char*)pattern->ptr,
sdslen(pattern->ptr),
(char*)channel->ptr,
sdslen(channel->ptr),0)) continue;
listRewind(clients,&li);
while ((ln = listNext(&li)) != NULL) {
client *c = listNodeValue(ln);
addReplyPubsubPatMessage(c,pattern,channel,message);
updateClientMemUsage(c);
receivers++;
}
}
decrRefCount(channel);
dictReleaseIterator(di);
}
return receivers;
}
同时,为何pattern 还需要作为参数传入addReplyPubsubPatMessage?
因为这个pattern除了可以模式匹配channel外,还可以匹配message的内容。
/* Send a pubsub message of type "pmessage" to the client. The difference
* with the "message" type delivered by addReplyPubsubMessage() is that
* this message format also includes the pattern that matched the message. */
void addReplyPubsubPatMessage(client *c, robj *pat, robj *channel, robj *msg) {
if (c->resp == 2)
addReply(c,shared.mbulkhdr[4]);
else
addReplyPushLen(c,4);
addReply(c,shared.pmessagebulk);
addReplyBulk(c,pat);
addReplyBulk(c,channel);
addReplyBulk(c,msg);
}
再回看原文描述:
发送信息到模式的工作也是由 PUBLISH 命令进行的, 显然就是匹配模式获得Channels,然后再把消息发给客户端
基于上下文而言和源码,这里的模式匹配是指“pubsubPattern中的pattern”, 这里的客户端指“pubsubPattern中的client”。所以不认为有任何歧义~
@realpdai channel不是PUBLISH命令的入参之一吗?为什么其中还会获得Channels(多个)呢? 源码看起来是拿入参的Channel,去跟链表里的所有pattern依次做匹配,获得匹配patterns对应的receivers 我比较纠结的是一次publish过程中应该只有一个channel?
刚开始深入学习redis,如果哪里不对还请继续指正。谢谢!
https://pdai.tech/md/dev-spec/spec/dev-th-base.html
Soft state(软状态)软状态也称为弱状态,和硬状态相对,是指允许系统中的数据存在中间状态,并认为该中间状态的存在不会影响系统的整体可用性,即允许系统在不同节点的数据副本之间进行数据听不的过程存在延时。
一个typo:数据听不(同步)的过程存在延时
@JoeyHe912
https://pdai.tech/md/dev-spec/spec/dev-th-base.html
Soft state(软状态)软状态也称为弱状态,和硬状态相对,是指允许系统中的数据存在中间状态,并认为该中间状态的存在不会影响系统的整体可用性,即允许系统在不同节点的数据副本之间进行数据听不的过程存在延时。
一个typo:数据听不(同步)的过程存在延时
感谢指出,已修复!
作者你好,我在阅读中发现了文章中的文字可能存在的错误。 文章标题:Java 基础 - 反射机制详解 文章链接:https://pdai.tech/md/java/basic/java-basic-x-reflection.html 原文①:RRIT(Run-Time Type Identification)运行时类型识别。 ①这个地方的缩写应该是“RTTI”? 原文②:数组同样也被映射为为class 对象的一个类。 ②这句话里面“为”字重复
@liusishan
作者你好,我在阅读中发现了文章中的文字可能存在的错误。 文章标题:Java 基础 - 反射机制详解 文章链接:https://pdai.tech/md/java/basic/java-basic-x-reflection.html 原文①:RRIT(Run-Time Type Identification)运行时类型识别。 ①这个地方的缩写应该是“RTTI”? 原文②:数组同样也被映射为为class 对象的一个类。 ②这句话里面“为”字重复
非常好的反馈格式!感谢指出,已经修复~
https://www.pdai.tech/md/java/thread/java-thread-x-lock-LockSupport.html --> Object.wait()和LockSupport.park()的区别 --> “如果在wait()之前执行了notify()会怎样? 抛出IllegalMonitorStateException异常;”
作者您好,这句话有点问题,如果在wait()之前调用notify()会怎样?程序应该会继续执行,但是wait会一直阻塞。 什么情况下抛出IllegalMonitorStateException异常呢?当前线程不是对象监视器的所有者时,调用nofify或者wait都会抛出此异常。
https://pdai.tech/md/java/thread/java-thread-x-juc-overview.html
文中第一个图,途中写的是aotmic,图的拼写有错误
文章链接: https://pdai.tech/md/db/nosql-redis/db-redis-data-types.html 错误: Redis 集合SMEMBER命令【使用】错误了。
@zhenpingliu
https://www.pdai.tech/md/java/thread/java-thread-x-lock-LockSupport.html --> Object.wait()和LockSupport.park()的区别 --> “如果在wait()之前执行了notify()会怎样? 抛出IllegalMonitorStateException异常;”
作者您好,这句话有点问题,如果在wait()之前调用notify()会怎样?程序应该会继续执行,但是wait会一直阻塞。 什么情况下抛出IllegalMonitorStateException异常呢?当前线程不是对象监视器的所有者时,调用nofify或者wait都会抛出此异常。
很棒!已经更正!
@lsbnbdz
https://pdai.tech/md/java/thread/java-thread-x-juc-overview.html
文中第一个图,途中写的是aotmic,图的拼写有错误
感谢指出,已经修复~
@cutehuman
文章链接: https://pdai.tech/md/db/nosql-redis/db-redis-data-types.html 错误: Redis 集合SMEMBER命令【使用】错误了。
新版本是SMEMBERS,感谢指出,已经修复~
https://pdai.tech/md/java/jvm/java-jvm-struct.html 图片裂了
@shoyu666
https://pdai.tech/md/java/jvm/java-jvm-struct.html 图片裂了
我这边看没有问题哈
https://pdai.tech/md/java/jvm/java-jvm-agent-arthas.html#%E9%87%8D%E8%A6%81%EF%BC%9A%E6%89%BE%E5%88%B0%E6%9C%80%E8%80%97%E6%97%B6%E7%9A%84%E6%96%B9%E6%B3%95%E8%B0%83%E7%94%A8 重要:找到最耗时的方法调用? 这里是否应该是trace而不是stack?
@JoeyHe912
https://pdai.tech/md/java/jvm/java-jvm-agent-arthas.html#%E9%87%8D%E8%A6%81%EF%BC%9A%E6%89%BE%E5%88%B0%E6%9C%80%E8%80%97%E6%97%B6%E7%9A%84%E6%96%B9%E6%B3%95%E8%B0%83%E7%94%A8 重要:找到最耗时的方法调用? 这里是否应该是trace而不是stack?
很棒,笔误了,已经修正,感谢指出!
地址: https://pdai.tech/md/dev-spec/spec/dev-th-acid.html
错误内容:
章节 什么是ACID。该词 Durablity(持久性)错误 ,请修改为 Durability(持久性)
@RoadTLife
地址: https://pdai.tech/md/dev-spec/spec/dev-th-acid.html
错误内容: 章节 什么是ACID。该词 Durablity(持久性)错误 ,请修改为 Durability(持久性)
感谢,已修复这个typo.
作者您好, Java 基础 - 知识点 这部分 关于hashCode() 知识点的demo System.out.println(e1.equals(e2)); // true 这行代码返回false
@by111
作者您好, Java 基础 - 知识点 这部分 关于hashCode() 知识点的demo System.out.println(e1.equals(e2)); // true 这行代码返回false
对不起,没问题的 我没和上面的demo结合起来看
https://pdai.tech/md/algorithm/alg-sort-x-shell.html
希尔排序稳定性
希尔排序是不稳定的算法,它满足稳定算法的定义。 这句话前后矛盾。
@b1tzer
https://pdai.tech/md/algorithm/alg-sort-x-shell.html
希尔排序稳定性
希尔排序是不稳定的算法,它满足稳定算法的定义。 这句话前后矛盾。
希尔排序不是稳定算法,它不满足稳定算法的定义。少了一个不...
感谢指出,已经修正完善!
https://pdai.tech/md/java/java8/java8-jre.html 原文:
JPEDS工具使用
应为:
JDEPS工具使用
在Map - LinkedHashSet&Map源码解析中,描述的是java1.6中的源码,但java1.8中由于hashmap的修改,LinkdeHashMap的源码也做了响应修改。应指出文中叙述的是java1.6版本,或添加jav1.8解说。
java中的Collection - LinkedList 源码解析 文章 链接:https://www.pdai.tech/md/java/collection/java-collection-LinkedList.html#removefirest-removelast-removee-removeindex 问题:标题出错removeFirest(), removeLast(), remove(e), remove(index) 应该是removeFirst()