FindForVerification retrieves a record by key WITHOUT triggering expiration callbacks. This is used for internal verification (e.g., checking timestamps before deletion). Returns the record even if expired, allowing caller to check timestamp.
(key []byte)
| 92 | // This is used for internal verification (e.g., checking timestamps before deletion). |
| 93 | // Returns the record even if expired, allowing caller to check timestamp. |
| 94 | func (bt *BTree) FindForVerification(key []byte) (*core.Record, bool) { |
| 95 | item, ok := bt.getItem(key) |
| 96 | if !ok || item.Record == nil { |
| 97 | return nil, false |
| 98 | } |
| 99 | return item.Record, true |
| 100 | } |
| 101 | |
| 102 | func (bt *BTree) InsertRecord(key []byte, record *core.Record) bool { |
| 103 | _, replaced := bt.index.Set(core.NewItem(key, record)) |