Skip to content

panic error index out of range on read data by index #34

@mikepop7

Description

@mikepop7

here is my config:
`
log, err := wal.Open("/tmp/wal/tidwall", &wal.Options{
SegmentSize: 128 * 1024 * 1024,
SegmentCacheSize: 1,
})

`

I start 2 go routine thread read segment data rand, and painc when read epos:
`
epos := s.epos[index-s.index]

`

it may caused by evicted itself when pushCache? LUR algorithm may could not put the segment specifying by segIdx to cache when this segment frequency less than others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions