MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewSnapshot

Method NewSnapshot

driver/hybriddb/db.go:290–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

288}
289
290func (db *DB) NewSnapshot() (driver.ISnapshot, error) {
291 db.mu.RLock()
292 defer db.mu.RUnlock()
293 snapshot, err := db.db.GetSnapshot()
294 if err != nil {
295 return nil, err
296 }
297 s := &Snapshot{
298 db: db,
299 snp: snapshot,
300 }
301 return s, nil
302}
303
304func (db *DB) Compact() error {
305 db.mu.Lock()

Callers 5

TestDB_SnapshotFunction · 0.45
TestSnapshotFunction · 0.45
TestSnapshot_IteratorFunction · 0.45
TestSnapshot_CloseFunction · 0.45
TestSnapshot_ConcurrentFunction · 0.45

Calls

no outgoing calls

Tested by 5

TestDB_SnapshotFunction · 0.36
TestSnapshotFunction · 0.36
TestSnapshot_IteratorFunction · 0.36
TestSnapshot_CloseFunction · 0.36
TestSnapshot_ConcurrentFunction · 0.36