github-actions[bot] commented on code in PR #15873: URL: https://github.com/apache/doris/pull/15873#discussion_r1067942363
########## be/src/io/fs/s3_file_system.h: ########## @@ -70,13 +71,13 @@ class S3FileSystem final : public RemoteFileSystem { }; // Guarded by external lock. - void set_ak(std::string ak) { _s3_conf.ak = std::move(ak); } - - // Guarded by external lock. - void set_sk(std::string sk) { _s3_conf.sk = std::move(sk); } + void set_conf(S3Conf s3_conf) { _s3_conf = std::move(s3_conf); } std::string get_key(const Path& path) const; +private: + S3FileSystem(S3Conf&& s3_conf, std::string&& id); + private: Review Comment: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] ```suggestion ``` **be/src/io/fs/s3_file_system.h:77:** previously declared here ```cpp private: ^ ``` ########## be/test/olap/remote_rowset_gc_test.cpp: ########## @@ -52,9 +53,14 @@ class RemoteRowsetGcTest : public testing::Test { s3_conf.region = config::test_s3_region; Review Comment: warning: no member named 'test_s3_region' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.region = config::test_s3_region; ^ ``` ########## be/test/olap/remote_rowset_gc_test.cpp: ########## @@ -52,9 +53,14 @@ s3_conf.region = config::test_s3_region; s3_conf.bucket = config::test_s3_bucket; Review Comment: warning: no member named 'test_s3_bucket' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.bucket = config::test_s3_bucket; ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -50,10 +52,15 @@ s3_conf.endpoint = config::test_s3_endpoint; s3_conf.region = config::test_s3_region; Review Comment: warning: no member named 'test_s3_region' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.region = config::test_s3_region; ^ ``` ########## be/test/olap/tablet_test.cpp: ########## @@ -313,7 +312,8 @@ TabletSharedPtr _tablet(new Tablet(_tablet_meta, nullptr)); _tablet->init(); - _tablet->set_storage_policy("test_policy_name"); + constexpr int64_t storage_policy_id = 10000; + _tablet->set_storage_policy_id(storage_policy_id); _tablet->_rs_version_map[ptr1->version()] = rowset1; _tablet->_rs_version_map[ptr2->version()] = rowset2; Review Comment: warning: '_rs_version_map' is a private member of 'doris::Tablet' [clang-diagnostic-error] ```cpp _tablet->_rs_version_map[ptr2->version()] = rowset2; ^ ``` **be/src/olap/tablet.h:410:** declared private here ```cpp std::unordered_map<Version, RowsetSharedPtr, HashOfVersion> _rs_version_map; ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -50,10 +52,15 @@ class TabletCooldownTest : public testing::Test { s3_conf.endpoint = config::test_s3_endpoint; Review Comment: warning: no member named 'test_s3_endpoint' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.endpoint = config::test_s3_endpoint; ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -50,10 +52,15 @@ s3_conf.endpoint = config::test_s3_endpoint; s3_conf.region = config::test_s3_region; s3_conf.bucket = config::test_s3_bucket; Review Comment: warning: no member named 'test_s3_bucket' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.bucket = config::test_s3_bucket; ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -50,10 +52,15 @@ s3_conf.endpoint = config::test_s3_endpoint; s3_conf.region = config::test_s3_region; s3_conf.bucket = config::test_s3_bucket; - s3_conf.prefix = "tablet_cooldown_test"; - auto s3_fs = std::make_shared<io::S3FileSystem>(std::move(s3_conf), kResourceId); + s3_conf.prefix = config::test_s3_prefix + "/tablet_cooldown_test"; Review Comment: warning: no member named 'test_s3_prefix' in namespace 'doris::config' [clang-diagnostic-error] ```cpp s3_conf.prefix = config::test_s3_prefix + "/tablet_cooldown_test"; ^ ``` ########## be/src/olap/tablet_meta.cpp: ########## @@ -865,7 +865,7 @@ bool operator==(const TabletMeta& a, const TabletMeta& b) { } if (a._in_restore_mode != b._in_restore_mode) return false; if (a._preferred_rowset_type != b._preferred_rowset_type) return false; - if (a._storage_policy != b._storage_policy) return false; + if (a._storage_policy_id != b._storage_policy_id) return false; Review Comment: warning: statement should be inside braces [readability-braces-around-statements] ```suggestion if (a._storage_policy_id != b._storage_policy_id) { return false; } ``` ########## be/test/olap/tablet_test.cpp: ########## @@ -313,7 +312,8 @@ TEST_F(TestTablet, cooldown_policy) { TabletSharedPtr _tablet(new Tablet(_tablet_meta, nullptr)); _tablet->init(); - _tablet->set_storage_policy("test_policy_name"); + constexpr int64_t storage_policy_id = 10000; + _tablet->set_storage_policy_id(storage_policy_id); _tablet->_rs_version_map[ptr1->version()] = rowset1; Review Comment: warning: '_rs_version_map' is a private member of 'doris::Tablet' [clang-diagnostic-error] ```cpp _tablet->_rs_version_map[ptr1->version()] = rowset1; ^ ``` **be/src/olap/tablet.h:410:** declared private here ```cpp std::unordered_map<Version, RowsetSharedPtr, HashOfVersion> _rs_version_map; ^ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org