MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / FindForVerification

Method FindForVerification

internal/data/btree.go:94–100  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
94func (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
102func (bt *BTree) InsertRecord(key []byte, record *core.Record) bool {
103 _, replaced := bt.index.Set(core.NewItem(key, record))

Calls 1

getItemMethod · 0.95