kangpinghuang commented on a change in pull request #2691: add rowset state
URL: https://github.com/apache/incubator-doris/pull/2691#discussion_r364545465
 
 

 ##########
 File path: be/src/olap/rowset/rowset.h
 ##########
 @@ -95,6 +151,37 @@ class Rowset : public std::enable_shared_from_this<Rowset> 
{
     // TODO should we rename the method to remove_files() to be more specific?
     virtual OLAPStatus remove() = 0;
 
+    // close to clear the resource owned by rowset
+    // including: open files, indexes and so on
+    // NOTICE: can not call this function in multithreads
+    void close() {
+        RowsetState old_state = _rowset_state_machine.rowset_state();
+        if (old_state == ROWSET_UNLOADED) {
 
 Review comment:
   yes, u are right.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to