github-actions[bot] commented on code in PR #42448:
URL: https://github.com/apache/doris/pull/42448#discussion_r1830300264


##########
be/src/olap/tablet_schema.cpp:
##########
@@ -947,9 +951,18 @@ void TabletSchema::clear_columns() {
     _num_null_columns = 0;
     _num_key_columns = 0;
     _cols.clear();
+    clear_column_cache_handlers();
+}
+
+void TabletSchema::clear_column_cache_handlers() {
+    for (auto* cache_handle : _column_cache_handlers) {
+        TabletColumnObjectPool::instance()->release(cache_handle);
+    }
+    _column_cache_handlers.clear();
 }
 
-void TabletSchema::init_from_pb(const TabletSchemaPB& schema, bool 
ignore_extracted_columns) {
+void TabletSchema::init_from_pb(const TabletSchemaPB& schema, bool 
ignore_extracted_columns,

Review Comment:
   warning: function 'init_from_pb' exceeds recommended size/complexity 
thresholds [readability-function-size]
   ```cpp
   void TabletSchema::init_from_pb(const TabletSchemaPB& schema, bool 
ignore_extracted_columns,
                      ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/olap/tablet_schema.cpp:963:** 88 lines including whitespace and 
comments (threshold 80)
   ```cpp
   void TabletSchema::init_from_pb(const TabletSchemaPB& schema, bool 
ignore_extracted_columns,
                      ^
   ```
   
   </details>
   



-- 
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

Reply via email to