Closed GoogleCodeExporter closed 9 years ago
First, leveldb does something unusual that might be worth knowing about: the
size of the *.log file is not expected to change very fast since the log file
is pre-enlarged and then mmapped and written to directly using memcpy.
About your feature request: there are already ways to achieve this.
(a) Kernel tuning flags should allow tweaking the 30 second delay downwards (I
think the parameter you are looking for is /proc/sys/vm/dirty_expire_centisecs).
(b) If you want to msync() just the leveldb data, you can achieve this by
having a background thread of your own that just does a sync=true innocuous
write to the database. Deleting a non-existent key or writing an empty string
to a key you do not use should suffice.
Given that there are existing mechanisms to achieve what you want, any feature
we add would just be a convenience. So I am not inclined to add the complexity
of such a feature to leveldb.
Original comment by san...@google.com
on 25 Mar 2013 at 11:22
Original issue reported on code.google.com by
wuzuy...@gmail.com
on 22 Mar 2013 at 5:30