db_stress shouldn't assert file size 0 if file creation fails
Summary: OnTableFileCreated() now is also called when the file creaion fails. In that case, we shouldn't assert the file size is not 0. Test Plan: Run crash test Reviewers: yiwu, andrewkr, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: IslamAbdelRahman, leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D61137
This commit is contained in:
parent
d3bfd33972
commit
d4c45428af
@ -920,11 +920,13 @@ class DbStressListener : public EventListener {
|
||||
assert(info.db_name == db_name_);
|
||||
assert(IsValidColumnFamilyName(info.cf_name));
|
||||
VerifyFilePath(info.file_path);
|
||||
assert(info.file_size > 0);
|
||||
assert(info.job_id > 0 || FLAGS_compact_files_one_in > 0);
|
||||
assert(info.table_properties.data_size > 0);
|
||||
assert(info.table_properties.raw_key_size > 0);
|
||||
assert(info.table_properties.num_entries > 0);
|
||||
if (info.status.ok()) {
|
||||
assert(info.file_size > 0);
|
||||
assert(info.table_properties.data_size > 0);
|
||||
assert(info.table_properties.raw_key_size > 0);
|
||||
assert(info.table_properties.num_entries > 0);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user