]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
[wal changes 1/3] fixed unbounded wal growth in some workloads
authorMike Kolupaev <kolmike@fb.com>
Thu, 2 Jul 2015 21:27:00 +0000 (14:27 -0700)
committeragiardullo <agiardullo@fb.com>
Tue, 7 Jul 2015 19:33:12 +0000 (12:33 -0700)
commitdc3cdfede9577de52be5d2961965aeb69a2b1330
treea5a9e4ed1858f0dc583b06f1f58a158ad8691381
parent8856b22edd59b2dbeec42d0970963be37421a096
[wal changes 1/3] fixed unbounded wal growth in some workloads

Summary:
This fixes the following scenario we've hit:
 - we reached max_total_wal_size, created a new wal and scheduled flushing all memtables corresponding to the old one,
 - before the last of these flushes started its column family was dropped; the last background flush call was a no-op; no one removed the old wal from alive_logs_,
 - hours have passed and no flushes happened even though lots of data was written; data is written to different column families, compactions are disabled; old column families are dropped before memtable grows big enough to trigger a flush; the old wal still sits in alive_logs_ preventing max_total_wal_size limit from kicking in,
 - a few more hours pass and we run out disk space because of one huge .log file.

Test Plan: `make check`; backported the new test, checked that it fails without this diff

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D40893
(cherry picked from commit 218487d8dc45c4cb03dbb80bd4d7031b131b9f25)
db/db_impl.cc
db/db_impl.h
db/db_impl_debug.cc
db/db_test.cc
db/version_set.h