mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-06 01:07:06 +08:00
fix: string.go execSetBit did not record aof log
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/bits"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/hdt3213/godis/aof"
|
"github.com/hdt3213/godis/aof"
|
||||||
"github.com/hdt3213/godis/datastruct/bitmap"
|
"github.com/hdt3213/godis/datastruct/bitmap"
|
||||||
"github.com/hdt3213/godis/interface/database"
|
"github.com/hdt3213/godis/interface/database"
|
||||||
@@ -8,10 +13,6 @@ import (
|
|||||||
"github.com/hdt3213/godis/lib/utils"
|
"github.com/hdt3213/godis/lib/utils"
|
||||||
"github.com/hdt3213/godis/redis/protocol"
|
"github.com/hdt3213/godis/redis/protocol"
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
"math/bits"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (db *DB) getAsString(key string) ([]byte, protocol.ErrorReply) {
|
func (db *DB) getAsString(key string) ([]byte, protocol.ErrorReply) {
|
||||||
@@ -676,6 +677,7 @@ func execSetBit(db *DB, args [][]byte) redis.Reply {
|
|||||||
former := bm.GetBit(offset)
|
former := bm.GetBit(offset)
|
||||||
bm.SetBit(offset, v)
|
bm.SetBit(offset, v)
|
||||||
db.PutEntity(key, &database.DataEntity{Data: bm.ToBytes()})
|
db.PutEntity(key, &database.DataEntity{Data: bm.ToBytes()})
|
||||||
|
db.addAof(utils.ToCmdLine3("setBit", args...))
|
||||||
return protocol.MakeIntReply(int64(former))
|
return protocol.MakeIntReply(int64(former))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user