Skip to content

Commit

Permalink
PForReader: include dir struct field for debugging
Browse files Browse the repository at this point in the history
related to #123
  • Loading branch information
stapelberg committed Jan 16, 2024
1 parent 0315b15 commit ef1baf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/index/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,20 @@ func newBufferPair() *bufferPair {
}

type PForReader struct {
// The dir field is unused in the code, but incredibly useful to keep around
// when looking at crash dumps in a debugger.
dir string

meta *mmap.File
data *mmap.File

//deltabuf []uint32
}

func newPForReader(dir, section string) (*PForReader, error) {
var sr PForReader
sr := PForReader{
dir: dir,
}
var err error
if sr.meta, err = mmap.Open(filepath.Join(dir, "posting."+section+".meta")); err != nil {
return nil, err
Expand Down

0 comments on commit ef1baf9

Please sign in to comment.