summaryrefslogtreecommitdiff
path: root/db/repair.cc
diff options
context:
space:
mode:
authorslk <sakesunlike@126.com>2021-11-10 10:47:53 -0800
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2021-11-10 10:49:04 -0800
commit937fbcbddca3d1a777271feb7dcce850d3bab86f (patch)
tree0d7150d68e4625d849776232c042c3591549f89c /db/repair.cc
parent1a8eec461b8d63035e1961ad4990b2e38ceecbb4 (diff)
Track per-SST user-defined timestamp information in MANIFEST (#9092)
Summary: Track per-SST user-defined timestamp information in MANIFEST https://github.com/facebook/rocksdb/issues/8957 Rockdb has supported user-defined timestamp feature. Application can specify a timestamp when writing each k-v pair. When data flush from memory to disk file called SST files, file creation activity will commit to MANIFEST. This commit is for tracking timestamp info in the MANIFEST for each file. The changes involved are as follows: 1) Track max/min timestamp in FileMetaData, and fix invoved codes. 2) Add NewFileCustomTag::kMinTimestamp and NewFileCustomTag::kMinTimestamp in NewFileCustomTag ( in the kNewFile4 part ), and support invoved codes such as VersionEdit Encode and Decode etc. 3) Add unit test code for VersionEdit EncodeDecodeNewFile4, and fix invoved test codes. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9092 Reviewed By: ajkr, akankshamahajan15 Differential Revision: D32252323 Pulled By: riversand963 fbshipit-source-id: d2642898d6e3ad1fef0eb866b98045408bd4e162
Diffstat (limited to 'db/repair.cc')
-rw-r--r--db/repair.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/repair.cc b/db/repair.cc
index cef0f7369..720b0296b 100644
--- a/db/repair.cc
+++ b/db/repair.cc
@@ -635,7 +635,8 @@ class Repairer {
table->meta.fd.largest_seqno, table->meta.marked_for_compaction,
table->meta.oldest_blob_file_number,
table->meta.oldest_ancester_time, table->meta.file_creation_time,
- table->meta.file_checksum, table->meta.file_checksum_func_name);
+ table->meta.file_checksum, table->meta.file_checksum_func_name,
+ table->meta.min_timestamp, table->meta.max_timestamp);
}
assert(next_file_number_ > 0);
vset_.MarkFileNumberUsed(next_file_number_ - 1);