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 "Piercarlo Slavazza (Jira)" <ji...@apache.org> on 2022/08/18 07:57:00 UTC
[jira] [Updated] (OAK-9905) File Store GC leaves the Store in an unconsistent state
[ https://issues.apache.org/jira/browse/OAK-9905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Piercarlo Slavazza updated OAK-9905:
------------------------------------
Description:
I created a File Store using Jackrabbit Oak v. 1.42.0.
I added some nodes, and then deleted some of them.
I then inspect the "history" of the store, using the very same code used by {{oak-run}} - but executed in my application (no OSGi):
{code:java}
Iterator<RevisionHistory.HistoryElement> history = new RevisionHistory(fileStoreFolder).getHistory(
new LocalJournalFile(journal),
path);
while (history.hasNext()) {
printWriter.println(history.next().toString(depth));
} {code}
I got the following output:
{code:java}
7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
55db2d1f-ffb0-4c47-ab7f-eca779bb4e08:450={"root":{}}
daadf7ca-0183-4a93-a94a-0c2347c89443:302={"root":{}}
fd234c75-9329-41f1-a9be-f7cef1d2ae7b:371={"root":{}}
3e86d6a1-76a5-4983-a779-48b3ee0e98fd:6={"root":{}}
5d05a2d8-f239-4fa0-a643-27bd281a6573:7102={"root":{}} {code}
that is fine - as far as I can tell.
Then, I run {{{}fileSto{}}}{{{}re.fullGC();{}}} - log attached [^full_gc.log].
Then, I run again the code that inspect the history, and I got the following output:
{code:java}
10cedc98-86ed-4a48-a22b-18fe8c34ed3e:7424={"root":{}}
7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
Segment 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08 not found{code}
The expected behaviour is that:
* either revision {{55db2d1f-ffb0-4c47-ab7f-eca779bb4e08}} is no more present in the history of the file store
* or revision is present and can be found
Despite this issue, it _seems_ that everything is running smooth, but I cannot tell whether this issue will bug some thing at some point.
Also note that, if I stop my application and run {{oak-run compact}} from the command line, the troubled revision is removed and I end up with just one revision:
{code:java}
Apache Jackrabbit Oak 1.42.0
07:53:00.534 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
07:53:00.549 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
635924e4-2e18-4bad-ac43-7347f4b1dfe0:7424={"root":{}}
{code}
(Please also noe the two warnings printed by {{{}oak-run{}}}…).
was:
I created a File Store using Jackrabbit Oak v. 1.42.0.
I added some nodes, and then deleted some of them.
I then inspect the "history" of the store, using the very same code used by {{oak-run}} - but executed in my application (no OSGi):
{code:java}
Iterator<RevisionHistory.HistoryElement> history = new RevisionHistory(fileStoreFolder).getHistory(
new LocalJournalFile(journal),
path);
while (history.hasNext()) {
printWriter.println(history.next().toString(depth));
} {code}
I got the following output:
{code:java}
7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
55db2d1f-ffb0-4c47-ab7f-eca779bb4e08:450={"root":{}}
daadf7ca-0183-4a93-a94a-0c2347c89443:302={"root":{}}
fd234c75-9329-41f1-a9be-f7cef1d2ae7b:371={"root":{}}
3e86d6a1-76a5-4983-a779-48b3ee0e98fd:6={"root":{}}
5d05a2d8-f239-4fa0-a643-27bd281a6573:7102={"root":{}} {code}
that is fine - as far as I can tell.
Then, I run {{{}fileSto{}}}{{{}re.fullGC();{}}} - log attached [^full_gc.log].
Then, I run again the code that inspect the history, and I got the following output:
{code:java}
10cedc98-86ed-4a48-a22b-18fe8c34ed3e:7424={"root":{}}
7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
Segment 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08 not found{code}
The expected behaviour is that:
* either revision {{55db2d1f-ffb0-4c47-ab7f-eca779bb4e08}} is no more present in the history of the file store
* or revision is present and can be found
Despite this issue, it _seems_ that everything is running smooth, but I cannot tell whether this issue will bug some thing at some point.
Also note that, if I stop my application and run {{oak-run compact}} from the command line, the troubled revision is removed and I end up with just one revision:
{code:java}
Apache Jackrabbit Oak 1.42.0
07:53:00.534 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
07:53:00.549 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
635924e4-2e18-4bad-ac43-7347f4b1dfe0:7424={"root":{}}
{code}
(Please also noe the two warnings printed by {{{}oak-run{}}}…).
> File Store GC leaves the Store in an unconsistent state
> -------------------------------------------------------
>
> Key: OAK-9905
> URL: https://issues.apache.org/jira/browse/OAK-9905
> Project: Jackrabbit Oak
> Issue Type: Bug
> Affects Versions: 1.42.0
> Reporter: Piercarlo Slavazza
> Priority: Blocker
> Attachments: full_gc.log
>
>
> I created a File Store using Jackrabbit Oak v. 1.42.0.
> I added some nodes, and then deleted some of them.
> I then inspect the "history" of the store, using the very same code used by {{oak-run}} - but executed in my application (no OSGi):
> {code:java}
> Iterator<RevisionHistory.HistoryElement> history = new RevisionHistory(fileStoreFolder).getHistory(
> new LocalJournalFile(journal),
> path);
> while (history.hasNext()) {
> printWriter.println(history.next().toString(depth));
> } {code}
> I got the following output:
> {code:java}
> 7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
> c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
> 8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
> 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08:450={"root":{}}
> daadf7ca-0183-4a93-a94a-0c2347c89443:302={"root":{}}
> fd234c75-9329-41f1-a9be-f7cef1d2ae7b:371={"root":{}}
> 3e86d6a1-76a5-4983-a779-48b3ee0e98fd:6={"root":{}}
> 5d05a2d8-f239-4fa0-a643-27bd281a6573:7102={"root":{}} {code}
> that is fine - as far as I can tell.
> Then, I run {{{}fileSto{}}}{{{}re.fullGC();{}}} - log attached [^full_gc.log].
> Then, I run again the code that inspect the history, and I got the following output:
> {code:java}
> 10cedc98-86ed-4a48-a22b-18fe8c34ed3e:7424={"root":{}}
> 7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
> c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
> 8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
> Segment 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08 not found{code}
> The expected behaviour is that:
> * either revision {{55db2d1f-ffb0-4c47-ab7f-eca779bb4e08}} is no more present in the history of the file store
> * or revision is present and can be found
> Despite this issue, it _seems_ that everything is running smooth, but I cannot tell whether this issue will bug some thing at some point.
> Also note that, if I stop my application and run {{oak-run compact}} from the command line, the troubled revision is removed and I end up with just one revision:
> {code:java}
> Apache Jackrabbit Oak 1.42.0
> 07:53:00.534 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
> 07:53:00.549 [main] WARN o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry:
> 635924e4-2e18-4bad-ac43-7347f4b1dfe0:7424={"root":{}}
> {code}
> (Please also noe the two warnings printed by {{{}oak-run{}}}…).
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)