]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Update documentation for backups and LogData
authorMayank Agarwal <amayank@fb.com>
Thu, 5 Sep 2013 21:49:59 +0000 (14:49 -0700)
committerMayank Agarwal <amayank@fb.com>
Thu, 5 Sep 2013 22:33:37 +0000 (15:33 -0700)
Summary: LogData doesn't consume sequence numbers and doesn't increase the count of the write-batch. Also it was discussed that GetLiveFiles will have to be followed by GetSortedWalFiles to get a lossless backup

Test Plan: visual

Reviewers: dhruba, haobo

Reviewed By: dhruba

CC: leveldb
Differential Revision: https://reviews.facebook.net/D12753

include/rocksdb/db.h
include/rocksdb/write_batch.h

index 5b4094fa59770ff3ef5b78bbb9cad0df7b013014..98025955f2415654a76199b79b8c8ff60dd361bf 100644 (file)
@@ -235,14 +235,15 @@ class DB {
   // Allow compactions to delete obselete files.
   virtual Status EnableFileDeletions() = 0;
 
+  // GetLiveFiles followed by GetSortedWalFiles can generate a lossless backup
+
   // THIS METHOD IS DEPRECATED. Use the GetTableMetaData to get more
   // detailed information on the live files.
   // Retrieve the list of all files in the database. The files are
-  // relative to the dbname and are not absolute paths. This list
-  // can be used to generate a backup. The valid size of the manifest
-  // file is returned in manifest_file_size. The manifest file is
-  // an ever growing file, but only the portion specified
-  // by manifest_file_size is valid for this snapshot.
+  // relative to the dbname and are not absolute paths. The valid size of the
+  // manifest file is returned in manifest_file_size. The manifest file is an
+  // ever growing file, but only the portion specified by manifest_file_size is
+  // valid for this snapshot.
   virtual Status GetLiveFiles(std::vector<std::string>&,
                               uint64_t* manifest_file_size) = 0;
 
index 8b771712faad14fe201c778aeab6f980f68e30bb..460402a6087ed3d1d3dfc16e37e906141cddec63 100644 (file)
@@ -43,12 +43,13 @@ class WriteBatch {
   // If the database contains a mapping for "key", erase it.  Else do nothing.
   void Delete(const Slice& key);
 
-  // Append a blob of arbitrary to the records in this batch. The blob will be
-  // stored in the transaction log but not in any other file. In particular, it
-  // will not be persisted to the SST files. When iterating over this
+  // Append a blob of arbitrary size to the records in this batch. The blob will
+  // be stored in the transaction log but not in any other file. In particular,
+  // it will not be persisted to the SST files. When iterating over this
   // WriteBatch, WriteBatch::Handler::LogData will be called with the contents
   // of the blob as it is encountered. Blobs, puts, deletes, and merges will be
-  // encountered in the same order in thich they were inserted.
+  // encountered in the same order in thich they were inserted. The blob will
+  // NOT consume sequence number(s) and will NOT increase the count of the batch
   //
   // Example application: add timestamps to the transaction log for use in
   // replication.