You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/04/14 18:47:12 UTC

[jira] [Commented] (OAK-2769) Add progress log to VersionGC in DocumentNodeStore

    [ https://issues.apache.org/jira/browse/OAK-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14494382#comment-14494382 ] 

Chetan Mehrotra commented on OAK-2769:
--------------------------------------

This would also help in debugging issues where cursor gets killed with VersionGC

{noformat}
09.04.2015 02:23:04.747 *ERROR* [pool-8-thread-35-Maintenance Queue(com/adobe/granite/maintenance/job/RevisionCleanupTask)] org.apache.jackrabbit.oak.management.ManagementOperation Revision garbage collection failed
com.mongodb.MongoException$CursorNotFound: Cursor 426315582934 not found on server mongoserver:27017
	at com.mongodb.QueryResultIterator.throwOnQueryFailure(QueryResultIterator.java:218)
	at com.mongodb.QueryResultIterator.init(QueryResultIterator.java:198)
	at com.mongodb.QueryResultIterator.initFromQueryResponse(QueryResultIterator.java:176)
	at com.mongodb.QueryResultIterator.getMore(QueryResultIterator.java:141)
	at com.mongodb.QueryResultIterator.hasNext(QueryResultIterator.java:127)
	at com.mongodb.DBCursor._hasNext(DBCursor.java:551)
	at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
	at com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:43)
	at org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector.collectDeletedDocuments(VersionGarbageCollector.java:95)
	at org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector.gc(VersionGarbageCollector.java:79)
	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService$2.run(DocumentNodeStoreService.java:472)
	at org.apache.jackrabbit.oak.spi.state.RevisionGC$1.call(RevisionGC.java:68)
	at org.apache.jackrabbit.oak.spi.state.RevisionGC$1.call(RevisionGC.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
09.04.2015 02:23:06.778 *INFO* [pool-7-thread-15] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Starting revision garbage collection. Revisions older than [2015-04-08 02:23:06.778] would be removed
09.04.2015 03:04:36.082 *INFO* [pool-7-thread-15] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version garbage collected in 41.49 min. VersionGCStats{ignoredGCDueToCheckPoint=false, deletedDocGCCount=295702, splitDocGCCount=2632, intermediateSplitDocGCCount=232}
{noformat}

Per [1] Mongo would kill a cursor if its inactive for 10 mins. But the way we use the Cursor I am not sure how it can remain inactive for such long time.

[1] http://docs.mongodb.org/manual/core/cursors/#closure-of-inactive-cursors

> Add progress log to VersionGC in DocumentNodeStore
> --------------------------------------------------
>
>                 Key: OAK-2769
>                 URL: https://issues.apache.org/jira/browse/OAK-2769
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: mongomk
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.0.13, 1.3.0
>
>
> While performing VersionGC when large number of documents are deleted at times version gc takes upto an hour. It would be helpful to log progress logs as it traverses the deleted document cursor



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)