摘要: go help packages 阅读全文
posted @ 2020-10-27 20:21 idea偶买噶 阅读(62) 评论(0) 推荐(0) 编辑
摘要: panic: net/http: internal error: connCount underflow goroutine 46 [running]: net/http.(*Transport).decConnsPerHost(0x1548ea0, 0x0, 0x0, 0xc000053ce0, 阅读全文
posted @ 2020-09-21 20:55 idea偶买噶 阅读(503) 评论(0) 推荐(0) 编辑
摘要: ``` PUT _template/log-template { "template": "log.*", "settings": { "number_of_shards": "3", "number_of_replicas": "1" } } ``` 阅读全文
posted @ 2020-05-15 15:01 idea偶买噶 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 保证数据唯一性的办法 primay key or unique index insert ignore replace into insert into ... select ... where not exist 其中的 DUAL 是一个临时表,不需要物理创建,这么用即可。 阅读全文
posted @ 2020-04-21 14:32 idea偶买噶 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 分片、rebalance、allocation "Cluster level shard allocation" 阅读全文
posted @ 2020-04-21 10:29 idea偶买噶 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 注意问题: 1. 需要读取body, 否则不能复用连接 io.Copy(ioutil.Discard, resp.Body) 阅读全文
posted @ 2020-04-20 11:39 idea偶买噶 阅读(643) 评论(0) 推荐(0) 编辑
摘要: redis和mysql数据一致性的问题 在这里,我们讨论 三种 更新策略: 1. 先更新缓存,再更新数据库 2. 先更新数据库,再更新缓存 3. 先删除缓存,再更新数据库 4. 先更新数据库,再删除缓存 第一种,先更新缓存,再更新数据库 问题:更新缓存成功,更新数据库失败,导致数据不一致。 第二种, 阅读全文
posted @ 2020-04-01 23:47 idea偶买噶 阅读(19033) 评论(12) 推荐(2) 编辑
摘要: http keep alive与tcp keep alive http keep alive与tcp keep alive,不是同一回事,意图不一样。http keep alive是为了让tcp活得更久一点,以便在同一个连接上传送多个http,提高socket的效率。而tcp keep alive是 阅读全文
posted @ 2020-03-29 11:10 idea偶买噶 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 5 Tricks to Get Instant Command Line Help in the Mac OS X Terminal | Command | Action / Results | | | | | | Display the manual page for (command). eg: 阅读全文
posted @ 2020-03-28 13:58 idea偶买噶 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 最好不要用这种方式: 推荐以下方式: 阅读全文
posted @ 2020-03-13 15:38 idea偶买噶 阅读(923) 评论(0) 推荐(0) 编辑