[
https://issues.apache.org/jira/browse/OAK-4657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Dulceanu updated OAK-4657:
---------------------------------
Attachment: OAK-4657.patch
I reworked the patch to use {{GCMonitorBean}} instead of
{{FileStoreStatsMBean}} for exposing reclaimed bytes / repository size from the
last gc cycle through {{GCMonitorBean.getLastReclaimedSize()}} and
{{GCMonitorBean.getLastRepositorySize()}}.
[~alexparvulescu] Since there were some changes related to your work in
OAK-4293, could you take a look at the changes introduced in the patch?
[~mduerig] As previously stated, there's a new test in
{{CompactionAndCleanupIT.concurrentWritesDuringCleanup()}} to assert a positive
reclaimed size after a cleanup cycle with concurrent writes in between. Now I
have a dilemma and don't know if this behaviour is normal or not. The current
test reports a reclaimed size of {{330240 bytes}}, for 5 threads, each creating
a {{65536 bytes}} blob. So more or less it looks like everything is cleaned up,
although this should not happen.
Now if I take the same code and replace the line in [1] with
{{concurrentWriteTask.run()}}, basically serialising all writes to the
repository, then an expected {{0 bytes}} reclaimed size shows up.
Moreover this is the list of tar files generated by the parallel version:
||Size||Time||Name||
|5.0K|Aug 11 11:16|data00000a.tar|
|5.0K|Aug 11 11:16|data00000b.tar|
|336K|Aug 11 11:16|data00001a.tar|
and here's the tar file generated by the serialised version:
||Size||Time||Name||
|333K|Aug 11 11:16|data00000a.tar|
To sum up something is wrong with this test which would need to test IMO
{{assertTrue(fileStoreGCMonitor.getLastReclaimedSize() == 0)}} for this
particular scenario. Any advice on this?
[1]
https://github.com/dulceanu/jackrabbit-oak/blob/issues/OAK-4657/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java#L971
> Add metric for FileStore cleanup reclaimed size
> -----------------------------------------------
>
> Key: OAK-4657
> URL: https://issues.apache.org/jira/browse/OAK-4657
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Affects Versions: Segment Tar 0.0.10
> Reporter: Andrei Dulceanu
> Assignee: Andrei Dulceanu
> Priority: Minor
> Fix For: Segment Tar 0.0.12
>
> Attachments: OAK-4657-01.patch, OAK-4657.patch
>
>
> It would be good to have a metric to capture the number of bytes actually
> removed from disk after each cleanup cycle. Looking at repository size
> before/after cleanup can be misleading as concurrent writes can happen in
> between.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)