Skip to content

MaxKeys/MaxInUse does not work when configured values are less than partitionCount/ownedPartitionCount #278

@sojadhav

Description

@sojadhav

config:
MaxKeys : 10
PartitonCount 271
MemberCount: 2

I am able to insert more than 10 keys; how do I make sure the cache only keeps x keys?

Observation:

I tried to debug little bit and it seems when I try to put any key, Olric checks size of selected/newly created fragment. In my case, it creates new fragment for all those 10 keys & https://github.com/olric-data/olric/blob/master/internal/dmap/put.go#L233 condition becomes false, because the fragment is newly created and this is the first key; it will only evict key if existing fragment is selected 2nd time

Is there a way we can check the size of all partitions/fragments and then see if we can evict any key or not ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions