03 2022 档案

mysql in不走索引可能的情况
摘要:在MySQL 5.7.3以及之前的版本中,eq_range_index_dive_limit的默认值为10,之 后的版本默认值为200。所以如果大家采用的是5.7.3以及之前的版本的话,很容易采用索引统计数据而 不是index dive的方式来计算查询成本。当你的查询中使用到了IN查询,但是却实际没 阅读全文

posted @ 2022-03-25 01:03 biwentao 阅读(1897) 评论(0) 推荐(1) 编辑

golang 切片原理面试题
摘要:package main import "fmt" func main() { var s = make([]int, 0, 10) _ = append(s, 1,2,3) fmt.Println(s) fmt.Println(s[0:cap(s)]) } 第一次打印和第二次打印分别是什么值了? 阅读全文

posted @ 2022-03-22 15:40 biwentao 阅读(143) 评论(0) 推荐(0) 编辑

20220314线上panic总结
摘要:panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x9273ea] gorout 阅读全文

posted @ 2022-03-14 17:23 biwentao 阅读(121) 评论(0) 推荐(0) 编辑

kubernetes 二次开发-认证,鉴权(1)
摘要:基于webhook的认证 授权过程 认证授权服务需要满足如下kubernetes的规范 kubernetes api-server组件发送 http post 请求 url:https://authn.example.com/authenticate json body信息: { "apiVersi 阅读全文

posted @ 2022-03-10 00:13 biwentao 阅读(198) 评论(0) 推荐(0) 编辑

golang 怎样防止结构体对象被拷贝
摘要:主要实现Lock以及Unlock就可以了 此时使用go vet mian.go 检查就会提示我们./main1.go:25:7: assignment copies lock value to b: command-line-arguments.App contains command-line-a 阅读全文

posted @ 2022-03-08 16:48 biwentao 阅读(337) 评论(0) 推荐(0) 编辑

一个简单demo展示应用接口使用goroutine优雅退出
摘要:package main import ( "context" "errors" "log" "net/http" "sync" "time" ) type Tracker struct { wg sync.WaitGroup } type App struct { track Tracker } 阅读全文

posted @ 2022-03-08 15:48 biwentao 阅读(42) 评论(0) 推荐(0) 编辑

一个简单demo展示接口请求超时处理
摘要:package main import ( "context" "errors" "fmt" "time" ) type result struct { record string err error } func search(term string) (string, error) { time 阅读全文

posted @ 2022-03-08 15:19 biwentao 阅读(53) 评论(0) 推荐(0) 编辑

导航

< 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
点击右上角即可分享
微信分享提示