fix comments and readme

This commit is contained in:
hdt3213
2021-06-15 01:14:41 +08:00
parent 8a04fe644a
commit ef5639f40b
3 changed files with 4 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ Key Features:
- support string, list, hash, set, sorted set - support string, list, hash, set, sorted set
- ttl - ttl
- publish/suscribe - publish/subscribe
- geo - geo
- aof and aof rewrite - aof and aof rewrite
- Transaction. The `multi` command is Atomic and Isolated. If any errors are encountered during execution, godis will rollback the executed commands - Transaction. The `multi` command is Atomic and Isolated. If any errors are encountered during execution, godis will rollback the executed commands

View File

@@ -12,6 +12,7 @@ Godis 是一个用 Go 语言实现的 Redis 服务器。本项目旨在为尝试
关键功能: 关键功能:
- 支持 string, list, hash, set, sorted set 数据结构 - 支持 string, list, hash, set, sorted set 数据结构
- 自动过期功能(TTL) - 自动过期功能(TTL)
- 发布订阅
- 地理位置 - 地理位置
- AOF 持久化及AOF重写 - AOF 持久化及AOF重写
- 事务. Multi 命令开启的事务具有`原子性``隔离性`. 若在执行过程中遇到错误, godis 会回滚已执行的命令 - 事务. Multi 命令开启的事务具有`原子性``隔离性`. 若在执行过程中遇到错误, godis 会回滚已执行的命令

View File

@@ -127,6 +127,7 @@ func (locks *Locks) RUnLocks(keys ...string) {
} }
} }
// RWLocks locks write keys and read keys together. allow duplicate keys
func (locks *Locks) RWLocks(writeKeys []string, readKeys []string) { func (locks *Locks) RWLocks(writeKeys []string, readKeys []string) {
keys := append(writeKeys, readKeys...) keys := append(writeKeys, readKeys...)
indices := locks.toLockIndices(keys, false) indices := locks.toLockIndices(keys, false)
@@ -146,6 +147,7 @@ func (locks *Locks) RWLocks(writeKeys []string, readKeys []string) {
} }
} }
// RWUnLocks unlocks write keys and read keys together. allow duplicate keys
func (locks *Locks) RWUnLocks(writeKeys []string, readKeys []string) { func (locks *Locks) RWUnLocks(writeKeys []string, readKeys []string) {
keys := append(writeKeys, readKeys...) keys := append(writeKeys, readKeys...)
indices := locks.toLockIndices(keys, true) indices := locks.toLockIndices(keys, true)