vagetablechicken commented on issue #3307: UniqueRowsetIdGenerator may use a 
lot of memory
URL: 
https://github.com/apache/incubator-doris/issues/3307#issuecomment-613222420
 
 
   If you worry about the waste memory of unused rowset. e.g. we released 
rowset_id(_inc_id==1), then we never use it. But it's in the bitset.
    ### For memory-conserving
    we can use a map of bitset
   ```
   std::map<int, bitset<SIZE>> bitsets;
   ```
   So `bitsets[id/SIZE][id%SIZE]` is the rowset_id bit.
   And if one bitset is all 0, we can delete it.(may need generate a gc task)
   
   ### For cleaner code
   just use a set of inc_id to store valid rowset. We can save 17/25 of memory, 
 more than 2/ 3.
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to