godis icon indicating copy to clipboard operation
godis copied to clipboard

A Golang implemented Redis Server and Cluster. Go 语言实现的 Redis 服务器和分布式集群

Results 25 godis issues
Sort by recently updated
recently updated
newest added

Fix the issue with the result format returned by the randomkey command. ## error: ```sh 127.0.0.1:6399> set k v OK 127.0.0.1:6399> RANDOMKEY "\"k\"" ``` ## correct: ```sh 127.0.0.1:6399> set k...

### 提交说明 本次提交主要是优化MultiBulkReply.ToBytes()方法;通过进来减少不必要的内存分配和字符串转换/拼接操作,从而提高性能和MultiBulkReply返回值的吞吐率;经过测试,对返回大批量数据的时候(例如LRANGE),性能提升明显.测试结果如下. ### 功能和benchmark测试 [utils_test.go](lib%2Futils%2Futils_test.go) #### 测试结果 ```text goos: windows goarch: amd64 pkg: github.com/hdt3213/godis/lib/utils cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Benchmark_Itoa_20bit Benchmark_Itoa_20bit-12 21663034 57.17 ns/op Benchmark_GetIotaLen_20bit Benchmark_GetIotaLen_20bit-12 39857972...

![geo_dist](https://github.com/HDT3213/godis/assets/30262489/4977dda6-9844-45f6-99ee-85887c0cdb6b) ![geo_radius](https://github.com/HDT3213/godis/assets/30262489/6bc77ceb-468a-410d-81e1-6259474ee589) 上面是我测试的部分截图

请教一下,Redis执行指令时候不是单线程执行的吗,为什么还要锁?接收网络请求时候是多线程,但是指令的执行是在一个线程里面的吧,理论上来说不是应该不需要锁吗