Discussion:
[leveldb] is there any significant cost in using snapshot for a long time
Ren Z
2016-08-23 16:33:25 UTC
Permalink
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?
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Escriva
2016-08-23 19:14:25 UTC
Permalink
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?
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
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...