mirror of
https://github.com/minio/minio.git
synced 2025-11-22 02:35:30 -05:00
Memory now evicts bucket if no more objects in memory struct
- To avoid race in expiration while accessing memory driver structs with in two competing write locks. Use lru Len() instead to know exact length to schedule for eviction. - squash both bucket and object structs, instead use a separate map to keep mutable info of lastAccessTime which can be independently used inside the expiration routine.
This commit is contained in:
@@ -19,6 +19,9 @@ package server
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/minio-io/minio/pkg/api"
|
||||
"github.com/minio-io/minio/pkg/api/web"
|
||||
"github.com/minio-io/minio/pkg/iodine"
|
||||
@@ -26,8 +29,6 @@ import (
|
||||
"github.com/minio-io/minio/pkg/storage/drivers/donut"
|
||||
"github.com/minio-io/minio/pkg/storage/drivers/memory"
|
||||
"github.com/minio-io/minio/pkg/utils/log"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
|
||||
// MemoryFactory is used to build memory api servers
|
||||
|
||||
Reference in New Issue
Block a user