Thanks Sijie, for the clarification. So going by Twitter's code, you intend
to run force Major/Minor compaction only once when enableForceGC is called.
Can you please confirm that (which is different from current community code
behavior. Not sure if it was bug in the current community code or it was
intended to be like that.) Also can you please confirm why it is having
different behavior in current community code?

Twitter code has diverged quite a bit from community code, any plans of
merging changes to the community?

Thanks,
Charan

On Tue, Feb 7, 2017 at 10:27 PM, Sijie Guo <[email protected]> wrote:

> The forceGarbageCollection was contributed by Twitter before. I remembered
> we wrapped that into a try-finally block. I just checked Twitter's branch.
> We did wrap that in a try-finally block. https://github.com/
> twitter/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/
> bookkeeper/bookie/GarbageCollectorThread.java#L563
>
> I need to merge that back.
>
> - Sijie
>
> On Tue, Feb 7, 2017 at 10:22 PM, Charan Reddy G <[email protected]>
> wrote:
>
>> Hey Sijie,
>>
>> Thanks for the response, but didn't get which finally block you are
>> referring to. Are you saying that before executing 'continue' statement in
>> major compaction 'if' block,  forceGarbageCollection should be set to
>> false, so that force Major/Minor compaction would be run only once when
>> enableForceGC is called?
>>
>> Thanks,
>> Charan
>>
>> On Feb 7, 2017 10:08 PM, "Sijie Guo" <[email protected]> wrote:
>>
>>> I think forceGarabageCollection should be set in a final block. Can't
>>> remember why it wasn't in current master branch.
>>>
>>> - Sijie
>>>
>>> On Tue, Feb 7, 2017 at 7:01 PM, Charan Reddy G <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to understand the reason behind "continue;" statement in
>>>> line 352 of GarbageCollectorThread.java (https://github.com/apache/boo
>>>> kkeeper/blob/master/bookkeeper-server/src/main/java/org/apac
>>>> he/bookkeeper/bookie/GarbageCollectorThread.java). It is
>>>> understandable that if we have done majorcompaction then minor compaction
>>>> is not required and it can be skipped, but aren't we missing "
>>>> forceGarbageCollection.set(false);" in line 362? Or is it supposed to
>>>> be like that?
>>>>
>>>> Basically I'm trying to findout when enableForceGC() is called, is it
>>>> supposed to trigger and do force GC/Compaction just once or untill it gets
>>>> disabled by calling disableForceGC()?
>>>>
>>>> Thanks,
>>>> Charan
>>>>
>>>
>>>
>

Reply via email to