WriteHintRecord writes index information to the hint file.
(key []byte, pst *LogRecordPst)
| 120 | |
| 121 | // WriteHintRecord writes index information to the hint file. |
| 122 | func (df *DataFile) WriteHintRecord(key []byte, pst *LogRecordPst) error { |
| 123 | record := &LogRecord{ |
| 124 | Key: key, |
| 125 | Value: EncodeLogRecordPst(pst), |
| 126 | } |
| 127 | encRecord, _ := EncodeLogRecord(record) |
| 128 | return df.Write(encRecord) |
| 129 | } |
| 130 | |
| 131 | func (df *DataFile) Sync() error { |
| 132 | return df.IoManager.Sync() |
no test coverage detected