[DISCUSSION] Clean files command supports specify segment ids

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] Clean files command supports specify segment ids

Yahui Liu
Clean files operation can specify segments to be deleted instead of delete all the Marked For Delete and Compacted segments after the number of theses segments reaches carbon.invisible.segments.preserve.count.
User can specify segments with option ```segment_ids```. Value of this option is the segment ids user wants to delete. Only Marked for Delete and Compacted segment ids are valid. If invalid ids are given, operation will fail directly.
If segments are specified, ```force``` option will be ignored.

Example:
   CLEAN FILES FOR TABLE TABLE_NAME options('segment_ids'='0,1,2')

Please give me some inputs, thanks all.
 
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Clean files command supports specify segment ids

akashrn5
Hi,

-1 for adding this option as i don't see any major problem or requirement here.

Current clean files operation takes care of so many things like segment level, file level, metadata level.
Already we have option of force , which handles actual deletion. The clean files command is already handled many times and i feel its fine for now. Adding other options and handling at segment level simply add complexity to code and confusion at user level and may be induce issues.

The current clean files implementation is ok, as based on user traffic hours they can run it.
Other community people can give their opinion.

Thanks

Regards,
Akash R
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Clean files command supports specify segment ids

vikramahuja1001
In reply to this post by Yahui Liu
Hi Jack,
Even i feel that this feature is not required and it does not serve any purpose. Clean files already has a lot of options which the user can use. The only benefit of giving choice to select segments to clean is that it will reduce the time taken to run the clean files operation for a specific segment compared to all the segments, but even that benefit will not be much compared.
-1 from my side as well.

Vikram Ahuja
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Clean files command supports specify segment ids

kunalkapoor
In reply to this post by Yahui Liu
Agreed with Akash

-1 from my side
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Clean files command supports specify segment ids

Indhumathi
In reply to this post by Yahui Liu
Hi,

-1 from my side, as the current clean files command already has multiple options and users can
trigger force delete of all segments during the off-peak time.

Regards,
Indhumathi M