Skip to content

Commit

Permalink
Revert "feat: support enabling mmap for collection (#632)" (#635)
Browse files Browse the repository at this point in the history
This reverts commit 83f95d7.

Signed-off-by: yah01 <[email protected]>
  • Loading branch information
yah01 authored Dec 7, 2023
1 parent 83f95d7 commit 43226a3
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions entity/collection_attr.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const (
cakTTL = `collection.ttl.seconds`
// cakAutoCompaction const for collection attribute key autom compaction enabled.
cakAutoCompaction = `collection.autocompaction.enabled`
akMmap = "mmap.enabled"
)

// CollectionAttribute is the interface for altering collection attributes.
Expand Down Expand Up @@ -90,23 +89,3 @@ func CollectionAutoCompactionEnabled(enabled bool) autoCompactionCollAttr {
ca.value = strconv.FormatBool(enabled)
return ca
}

type mmapAttr struct {
collAttrBase
}

func Mmap(enabled bool) mmapAttr {
attr := mmapAttr{}
attr.key = akMmap
attr.value = strconv.FormatBool(enabled)
return attr
}

func (ca mmapAttr) Valid() error {
_, err := strconv.ParseBool(ca.value)
if err != nil {
return errors.Wrap(err, "mmap setting is not valid boolean")
}

return nil
}

0 comments on commit 43226a3

Please sign in to comment.