wp
This commit is contained in:
@@ -115,7 +115,7 @@ func (s *WritePreparer) Prepare(input []any) PreparedData {
|
||||
}
|
||||
for _, level := range sealedIndexLevels {
|
||||
for _, p := range level.IndexPages {
|
||||
fmt.Printf("records: %v\n", getIndexRecords(p.Content, 2))
|
||||
//fmt.Printf("records: %v\n", getIndexRecords(p.Content, 2))
|
||||
s.indexPages = append(s.indexPages, PageToWrite{
|
||||
PageNo: p.PageNo,
|
||||
Content: p.Content,
|
||||
@@ -139,10 +139,12 @@ func (s *WritePreparer) Prepare(input []any) PreparedData {
|
||||
)
|
||||
if len(level.IndexPages) > 0 {
|
||||
first := level.IndexPages[0]
|
||||
firstCRC32, _ := bin.GetUint32(first.Content[indexCRC32Idx:])
|
||||
skipSize := level.SkipRecords * indexRecordSize
|
||||
indexPageTail = &IndexPageTail{
|
||||
PageNo: first.PageNo,
|
||||
Reused: first.Reused,
|
||||
CRC32: firstCRC32,
|
||||
// в WAL файл попадає лише payload
|
||||
Records: first.Content[skipSize : maxRecordsOnIndexPage*indexRecordSize],
|
||||
}
|
||||
@@ -181,11 +183,13 @@ func (s *WritePreparer) Prepare(input []any) PreparedData {
|
||||
Values: x.Values,
|
||||
},
|
||||
DataPages: sealedDataPages[1:],
|
||||
TailTimestamps: x.TailTimestamps,
|
||||
TailValues: x.TailValues,
|
||||
ChangedIndexLevels: changedIndexPages,
|
||||
TailTimestamps: x.Timestamps,
|
||||
TailValues: x.Values,
|
||||
}
|
||||
|
||||
fmt.Printf("%#v\ns", rec.ChangedIndexLevels[0].IndexPageTail)
|
||||
|
||||
rec.Pack(w)
|
||||
// Дані для Worker
|
||||
s.commits = append(s.commits, MeasuresAppendWithGrowCommited{
|
||||
|
||||
Reference in New Issue
Block a user