Disable bitfield for now, add creation logger

This commit is contained in:
DataHoarder 2022-02-03 20:34:24 +01:00
parent 5571319d41
commit dacfad675d

View file

@ -131,7 +131,7 @@ func NewAppendConverter(pathName string, useCompactHashes, usePackedValues bool)
c.controlSize = c.GetControlRecordSizeInEntries()
info, err := c.f.Stat()
c.fileSize = info.Size()
c.processedField = NewBitfield(uint64(c.fileSize / c.GetEntrySize()))
//c.processedField = NewBitfield(uint64(c.fileSize / c.GetEntrySize()))
c.ScanControlData()
return c, nil
}
@ -302,13 +302,17 @@ func (c *AppendConverter) ScanControlData() {
control := c.decodeControl(bytes.NewReader(buf[c.recordSize:]))
control.recordsStartIndex = recordIndex + c.controlSize
for i := int64(0); i < c.controlSize; i++ {
/*for i := int64(0); i < c.controlSize; i++ {
c.processedField.Set(uint64(recordIndex+i), true)
}
}*/
//advance seek using length information
recordIndex += c.controlSize + int64(control.length)
c.resourceIndex = append(c.resourceIndex, control)
if len(c.resourceIndex) == 1000 {
log.Printf("read %d control records\n", len(c.resourceIndex))
}
}
}