mirror of https://github.com/tidwall/tile38.git
Merge pull request #254 from rshura/fset_maxmemory
Add maxmemory protection to FSET
This commit is contained in:
commit
2088b5d2d2
|
@ -824,6 +824,10 @@ func (c *Controller) parseFSetArgs(vs []resp.Value) (
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) cmdFset(msg *server.Message) (res resp.Value, d commandDetailsT, err error) {
|
func (c *Controller) cmdFset(msg *server.Message) (res resp.Value, d commandDetailsT, err error) {
|
||||||
|
if c.config.maxMemory() > 0 && c.outOfMemory.on() {
|
||||||
|
err = errOOM
|
||||||
|
return
|
||||||
|
}
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
vs := msg.Values[1:]
|
vs := msg.Values[1:]
|
||||||
var fields []string
|
var fields []string
|
||||||
|
|
Loading…
Reference in New Issue