-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
options: Fix coverity issues #3106
Conversation
Summary: options/cf_options.cc: 77 memtable_insert_with_hint_prefix_extractor( CID 1396208 (facebook#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member info_log_level is not initialized in this constructor nor in any functions that it calls. 78 cf_options.memtable_insert_with_hint_prefix_extractor.get()) {} include/rocksdb/advanced_options.h: AdvancedColumnFamilyOptions::AdvancedColumnFamilyOptions() { 40 assert(memtable_factory.get() != nullptr); CID 1405359 (facebook#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member max_mem_compaction_level is not initialized in this constructor nor in any functions that it calls. 41} As max_mem_compaction_level is not supported anymore, undefine it.
include/rocksdb/advanced_options.h
Outdated
@@ -555,7 +555,7 @@ struct AdvancedColumnFamilyOptions { | |||
|
|||
// NOT SUPPORTED ANYMORE | |||
// This does not do anything anymore. | |||
int max_mem_compaction_level; | |||
// int max_mem_compaction_level; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you instead initialize this option to 0? It is leave here to avoid users hitting compile error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yiwu-arbug I have commented out all the references to max_mem_compaction_level variable from struct AdvancedColumnFamilyOptions. Would we still want to use max_mem_compaction_level variable ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep max_mem_compaction_level for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yiwu-arbug made the changes. There are 2 commits on this PR, but pick 37f163c only. Let me know if you want me to open another PR if things are messy.
options/cf_options.cc
Outdated
@@ -43,6 +43,7 @@ ImmutableCFOptions::ImmutableCFOptions(const ImmutableDBOptions& db_options, | |||
info_log(db_options.info_log.get()), | |||
statistics(db_options.statistics.get()), | |||
rate_limiter(db_options.rate_limiter.get()), | |||
info_log_level(INFO_LEVEL), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should initialize to db_options.info_log_level
7a15eb5
to
37f163c
Compare
@pdvian has updated the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagar0 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagar0 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary:
options/cf_options.cc:
77 memtable_insert_with_hint_prefix_extractor(
CID 1396208 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member info_log_level is not initialized in this constructor nor in any functions that it calls.