@ -12,6 +12,7 @@
# include "db/version_edit.h"
# include "db/version_set.h"
# include "rocksdb/advanced_options.h"
# include "table/unique_id_impl.h"
# include "test_util/testharness.h"
# include "test_util/testutil.h"
# include "util/string_util.h"
@ -72,7 +73,7 @@ class VersionBuilderTest : public testing::Test {
oldest_blob_file_number , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
f - > compensated_file_size = file_size ;
f - > num_entries = num_entries ;
f - > num_deletions = num_deletions ;
@ -128,13 +129,13 @@ class VersionBuilderTest : public testing::Test {
constexpr SequenceNumber largest_seqno = 300 ;
constexpr bool marked_for_compaction = false ;
edit - > AddFile ( level , table_file_number , path_id , file_size ,
GetInternalKey ( smallest ) , GetInternalKey ( larg est ) ,
smallest_seqno , largest_seqno , marked_for_compaction ,
Temperature : : kUnknown , blob_file_number ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
edit - > AddFile (
level , table_file_number , path_id , file_size , GetInternalKey ( smal lest) ,
GetInternalKey ( largest ) , smallest_seqno , largest_seqno ,
marked_for_compaction , Temperature : : kUnknown , blob_file_number ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp , kNullUniqueId64x2 ) ;
}
void UpdateVersionStorageInfo ( VersionStorageInfo * vstorage ) {
@ -175,12 +176,12 @@ TEST_F(VersionBuilderTest, ApplyAndSaveTo) {
UpdateVersionStorageInfo ( ) ;
VersionEdit version_edit ;
version_edit . AddFile ( 2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) ,
GetInternalKey ( " 350 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) , GetInternalKey ( " 350 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . DeleteFile ( 3 , 27U ) ;
EnvOptions env_options ;
@ -219,12 +220,12 @@ TEST_F(VersionBuilderTest, ApplyAndSaveToDynamic) {
UpdateVersionStorageInfo ( ) ;
VersionEdit version_edit ;
version_edit . AddFile ( 3 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) ,
GetInternalKey ( " 350 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
3 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) , GetInternalKey ( " 350 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . DeleteFile ( 0 , 1U ) ;
version_edit . DeleteFile ( 0 , 88U ) ;
@ -266,12 +267,12 @@ TEST_F(VersionBuilderTest, ApplyAndSaveToDynamic2) {
UpdateVersionStorageInfo ( ) ;
VersionEdit version_edit ;
version_edit . AddFile ( 4 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) ,
GetInternalKey ( " 350 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
4 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) , GetInternalKey ( " 350 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . DeleteFile ( 0 , 1U ) ;
version_edit . DeleteFile ( 0 , 88U ) ;
version_edit . DeleteFile ( 4 , 6U ) ;
@ -303,36 +304,36 @@ TEST_F(VersionBuilderTest, ApplyMultipleAndSaveTo) {
UpdateVersionStorageInfo ( ) ;
VersionEdit version_edit ;
version_edit . AddFile ( 2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) ,
GetInternalKey ( " 350 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 676 , 0 , 100U , GetInternalKey ( " 401 " ) ,
GetInternalKey ( " 450 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 636 , 0 , 100U , GetInternalKey ( " 601 " ) ,
GetInternalKey ( " 650 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 616 , 0 , 100U , GetInternalKey ( " 501 " ) ,
GetInternalKey ( " 550 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 606 , 0 , 100U , GetInternalKey ( " 701 " ) ,
GetInternalKey ( " 750 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) , GetInternalKey ( " 350 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 676 , 0 , 100U , GetInternalKey ( " 401 " ) , GetInternalKey ( " 450 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 636 , 0 , 100U , GetInternalKey ( " 601 " ) , GetInternalKey ( " 650 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 616 , 0 , 100U , GetInternalKey ( " 501 " ) , GetInternalKey ( " 550 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 606 , 0 , 100U , GetInternalKey ( " 701 " ) , GetInternalKey ( " 750 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
EnvOptions env_options ;
constexpr TableCache * table_cache = nullptr ;
@ -367,53 +368,53 @@ TEST_F(VersionBuilderTest, ApplyDeleteAndSaveTo) {
kCompactionStyleLevel , nullptr , false ) ;
VersionEdit version_edit ;
version_edit . AddFile ( 2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) ,
GetInternalKey ( " 350 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 676 , 0 , 100U , GetInternalKey ( " 401 " ) ,
GetInternalKey ( " 450 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 636 , 0 , 100U , GetInternalKey ( " 601 " ) ,
GetInternalKey ( " 650 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 616 , 0 , 100U , GetInternalKey ( " 501 " ) ,
GetInternalKey ( " 550 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile ( 2 , 606 , 0 , 100U , GetInternalKey ( " 701 " ) ,
GetInternalKey ( " 750 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
2 , 666 , 0 , 100U , GetInternalKey ( " 301 " ) , GetInternalKey ( " 350 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 676 , 0 , 100U , GetInternalKey ( " 401 " ) , GetInternalKey ( " 450 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 636 , 0 , 100U , GetInternalKey ( " 601 " ) , GetInternalKey ( " 650 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 616 , 0 , 100U , GetInternalKey ( " 501 " ) , GetInternalKey ( " 550 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit . AddFile (
2 , 606 , 0 , 100U , GetInternalKey ( " 701 " ) , GetInternalKey ( " 750 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
ASSERT_OK ( version_builder . Apply ( & version_edit ) ) ;
VersionEdit version_edit2 ;
version_edit . AddFile ( 2 , 808 , 0 , 100U , GetInternalKey ( " 901 " ) ,
GetInternalKey ( " 950 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
2 , 808 , 0 , 100U , GetInternalKey ( " 901 " ) , GetInternalKey ( " 950 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
version_edit2 . DeleteFile ( 2 , 616 ) ;
version_edit2 . DeleteFile ( 2 , 636 ) ;
version_edit . AddFile ( 2 , 806 , 0 , 100U , GetInternalKey ( " 801 " ) ,
GetInternalKey ( " 850 " ) , 200 , 200 , false ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
version_edit . AddFile (
2 , 806 , 0 , 100U , GetInternalKey ( " 801 " ) , GetInternalKey ( " 850 " ) , 200 , 200 ,
false , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
ASSERT_OK ( version_builder . Apply ( & version_edit2 ) ) ;
ASSERT_OK ( version_builder . SaveTo ( & new_vstorage ) ) ;
@ -525,7 +526,7 @@ TEST_F(VersionBuilderTest, ApplyFileDeletionAndAddition) {
kInvalidBlobFileNumber , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
ASSERT_OK ( builder . Apply ( & addition ) ) ;
@ -575,7 +576,7 @@ TEST_F(VersionBuilderTest, ApplyFileAdditionAlreadyInBase) {
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
kDisableUserTimestamp , kDisableUserTimestamp , kNullUniqueId64x2 ) ;
const Status s = builder . Apply ( & edit ) ;
ASSERT_TRUE ( s . IsCorruption ( ) ) ;
@ -612,7 +613,7 @@ TEST_F(VersionBuilderTest, ApplyFileAdditionAlreadyApplied) {
kInvalidBlobFileNumber , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
ASSERT_OK ( builder . Apply ( & edit ) ) ;
@ -620,13 +621,13 @@ TEST_F(VersionBuilderTest, ApplyFileAdditionAlreadyApplied) {
constexpr int new_level = 2 ;
other_edit . AddFile ( new_level , file_number , path_id , file_size ,
GetInternalKey ( smallest ) , GetInternalKey ( larg est ) ,
smallest_seqno , largest_seqno , marked_for_compaction ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
other_edit . AddFile (
new_level , file_number , path_id , file_size , GetInternalKey ( smal lest) ,
GetInternalKey ( largest ) , smallest_seqno , largest_seqno ,
marked_for_compaction , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
const Status s = builder . Apply ( & other_edit ) ;
ASSERT_TRUE ( s . IsCorruption ( ) ) ;
@ -657,13 +658,13 @@ TEST_F(VersionBuilderTest, ApplyFileAdditionAndDeletion) {
VersionEdit addition ;
addition . AddFile ( level , file_number , path_id , file_size ,
GetInternalKey ( smallest ) , GetInternalKey ( larg est ) ,
smallest_seqno , largest_seqno , marked_for_compaction ,
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
addition . AddFile (
level , file_number , path_id , file_size , GetInternalKey ( smal lest) ,
GetInternalKey ( largest ) , smallest_seqno , largest_seqno ,
marked_for_compaction , Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
ASSERT_OK ( builder . Apply ( & addition ) ) ;
@ -1227,12 +1228,13 @@ TEST_F(VersionBuilderTest, SaveBlobFilesToConcurrentJobs) {
constexpr uint64_t total_blob_count = 234 ;
constexpr uint64_t total_blob_bytes = 1 < < 22 ;
edit . AddFile (
level , table_file_number , path_id , file_size , GetInternalKey ( smallest ) ,
GetInternalKey ( largest ) , smallest_seqno , largest_seqno ,
marked_for_compaction , Temperature : : kUnknown , blob_file_number ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime , checksum_value ,
checksum_method , kDisableUserTimestamp , kDisableUserTimestamp ) ;
edit . AddFile ( level , table_file_number , path_id , file_size ,
GetInternalKey ( smallest ) , GetInternalKey ( largest ) ,
smallest_seqno , largest_seqno , marked_for_compaction ,
Temperature : : kUnknown , blob_file_number ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
checksum_value , checksum_method , kDisableUserTimestamp ,
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
edit . AddBlobFile ( blob_file_number , total_blob_count , total_blob_bytes ,
checksum_method , checksum_value ) ;
@ -1320,7 +1322,7 @@ TEST_F(VersionBuilderTest, CheckConsistencyForBlobFiles) {
/* oldest_blob_file_number */ 16 , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
edit . AddFile ( /* level */ 1 , /* file_number */ 700 , /* path_id */ 0 ,
/* file_size */ 100 , /* smallest */ GetInternalKey ( " 801 " ) ,
@ -1330,7 +1332,7 @@ TEST_F(VersionBuilderTest, CheckConsistencyForBlobFiles) {
/* oldest_blob_file_number */ 1000 , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
edit . AddBlobFile ( /* blob_file_number */ 1000 , /* total_blob_count */ 2000 ,
/* total_blob_bytes */ 200000 ,
/* checksum_method */ std : : string ( ) ,
@ -1552,7 +1554,7 @@ TEST_F(VersionBuilderTest, MaintainLinkedSstsForBlobFiles) {
/* oldest_blob_file_number */ 1 , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
// Add an SST that does not reference any blob files.
edit . AddFile (
@ -1563,7 +1565,7 @@ TEST_F(VersionBuilderTest, MaintainLinkedSstsForBlobFiles) {
Temperature : : kUnknown , kInvalidBlobFileNumber , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
// Delete a file that references a blob file.
edit . DeleteFile ( /* level */ 1 , /* file_number */ 6 ) ;
@ -1586,7 +1588,7 @@ TEST_F(VersionBuilderTest, MaintainLinkedSstsForBlobFiles) {
/* oldest_blob_file_number */ 3 , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
// Trivially move a file that does not reference any blob files.
edit . DeleteFile ( /* level */ 1 , /* file_number */ 13 ) ;
@ -1598,7 +1600,7 @@ TEST_F(VersionBuilderTest, MaintainLinkedSstsForBlobFiles) {
Temperature : : kUnknown , kInvalidBlobFileNumber ,
kUnknownOldestAncesterTime , kUnknownFileCreationTime ,
kUnknownFileChecksum , kUnknownFileChecksumFuncName ,
kDisableUserTimestamp , kDisableUserTimestamp ) ;
kDisableUserTimestamp , kDisableUserTimestamp , kNullUniqueId64x2 ) ;
// Add one more SST file that references a blob file, then promptly
// delete it in a second version edit before the new version gets saved.
@ -1612,7 +1614,7 @@ TEST_F(VersionBuilderTest, MaintainLinkedSstsForBlobFiles) {
/* oldest_blob_file_number */ 5 , kUnknownOldestAncesterTime ,
kUnknownFileCreationTime , kUnknownFileChecksum ,
kUnknownFileChecksumFuncName , kDisableUserTimestamp ,
kDisableUserTimestamp ) ;
kDisableUserTimestamp , kNullUniqueId64x2 ) ;
VersionEdit edit2 ;