is there any significant cost in using snapshot for a long time

32 views
Skip to first unread message

Ren Z

unread,
Aug 23, 2016, 12:33:25 PM8/23/16
to leveldb
Suppose I've made a snapshot and iterate through all the keys using it (to make a copy of a db). If db is large and under heavy read/write while doing this, is there any significant cost in terms of anything for holding snapshot for a long time?

Robert Escriva

unread,
Aug 23, 2016, 3:14:18 PM8/23/16
to lev...@googlegroups.com
Holding the snapshot will delay garbage collection of all data within
the snapshot, and all data overwritten after the snapshot is taken. So
if you frequently rewrite keys, you'll (potentially) end up with much
more disk usage than you would see in steady state without the snapshot.

-Robert
Reply all
Reply to author
Forward
0 new messages