Exception in Offline compaction of Oak segmentstore

Avatar

Avatar

radhikak8817019

Avatar

radhikak8817019

radhikak8817019

15-10-2015

Hi All,

As part of cleaning up the repository we tried to do the offline compaction, Please find below the steps we followed :

To see the full effect of the online compaction later, just remove the checkpoints and don't actually run the offline compaction.

  • Stop  AEM instance
  • run the oak-run.jar  to find any old checkpoints : we are using oak-run-1.0.8.jar

         java -jar oak-run-1.0.8.jar checkpoints your-install-folder/crx-quickstart/repository/segmentstore

We are getting the below exception

Exception in thread "main" java.lang.IllegalStateException
        at com.google.common.base.Preconditions.checkState(Preconditions.java:134)
        at org.apache.jackrabbit.oak.plugins.segment.Segment.<init>(Segment.java:129)
        at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.readSegment(FileStore.java:626)
        at org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.getSegment(SegmentTracker.java:117)
        at org.apache.jackrabbit.oak.plugins.segment.SegmentId.getSegment(SegmentId.java:97)
        at org.apache.jackrabbit.oak.plugins.segment.Record.getSegment(Record.java:82)
        at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getTemplate(SegmentNodeState.java:74)
        at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:334)
        at org.apache.jackrabbit.oak.run.Main.checkpoints(Main.java:383)
        at org.apache.jackrabbit.oak.run.Main.main(Main.java:139)

Kindly suggest if we are missing something?

Thanks,

RK

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

kalyanar

Employee

Avatar

kalyanar

Employee

kalyanar
Employee

15-10-2015

Hi, this was a bug in OAK and has been fixed in oak-core 1.1.0. Please find more info at this link https://issues.apache.org/jira/browse/OAK-1759.

Answers (7)

Answers (7)

Avatar

Avatar

Gokul2011

Avatar

Gokul2011

Gokul2011

15-10-2015

Hi Ashish,

As you are in latest version, can you install 1.0.16 Oak -core and run the same.

Avatar

Avatar

AshishSPanwar-a

Avatar

AshishSPanwar-a

AshishSPanwar-a

15-10-2015

I had tried with consistency check before but it still didn't work out.

/Ashish

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

15-10-2015

It seems there is some corruption in the repository as it is not able to read a property value due to an unknown data type. I would recommend you to first run consistency check and see if you find any issues there first - http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/consistency-check.html 

or try this command - 

curl -u admin:admin -X POST –data “workspace=crx.default&path=%2F&traversal=on&fixinconsistencies=on&log=off&datastoreconsistency=on” http://localhost:4502/system/console/repositorycheck

Avatar

Avatar

Opkar_Gill

Employee

Avatar

Opkar_Gill

Employee

Opkar_Gill
Employee

15-10-2015

Hi Ashish,

as this is a dev instance, have you attempted offline compaction[1]?

Regards,

Opkar

[1]http://cq-ops.tumblr.com/post/106629820639/how-to-reclaim-wasted-crx3-storage-using-off-line

Avatar

Avatar

AshishSPanwar-a

Avatar

AshishSPanwar-a

AshishSPanwar-a

15-10-2015

Hi,

I facing similar issue while executing following command:

java -jar oak-run.jar compact crx-quickstart/repository/segmentstore

I have AEM 6.0 with SP2 and other required hotfixes installed. Oak repo version 1.0.15 and I'm using the oak-run tool version 1.0.13, as recommended in official documentation.

Error stack trace:-

-> compacting

Exception in thread "main" java.lang.UnsupportedOperationException: Unknown type: UNDEFINED

    at org.apache.jackrabbit.oak.plugins.segment.SegmentPropertyState.getValue(SegmentPropertyState.java:188)

    at org.apache.jackrabbit.oak.plugins.segment.SegmentPropertyState.getValue(SegmentPropertyState.java:140)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor.compact(Compactor.java:194)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor.access$000(Compactor.java:49)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.propertyAdded(Compactor.java:115)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:155)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:137)

    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:160)

    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor.process(Compactor.java:92)

    at org.apache.jackrabbit.oak.plugins.segment.Compactor.compact(Compactor.java:97)

    at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.compact(FileStore.java:687)

    at org.apache.jackrabbit.oak.run.Main.compact(Main.java:365)

    at org.apache.jackrabbit.oak.run.Main.main(Main.java:130)

Though the repository is not growing as fast as some people have reported, I do feel that its current size of around 25GB is still quite a lot compared to the amount of data being generated on a daily basis and this too on a developer machine.
Could anyone advise on how to proceed from here?

/Ashish

Avatar

Avatar

kalyanar

Employee

Avatar

kalyanar

Employee

kalyanar
Employee

15-10-2015

The easier way is to raise a support ticket. 

Avatar

Avatar

manisha_joshi

Avatar

manisha_joshi

manisha_joshi

15-10-2015

Unable to find jar for oak-core 1.1.0 .It would be great if you could provide the link from where it could be downloaded.